var NGR = function(t) {
	"use strict";
	var o = function(t, e) {
		return (o = Object.setPrototypeOf || {
				__proto__: []
			}
			instanceof Array && function(t, e) {
				t.__proto__ = e
			} || function(t, e) {
				for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i])
			})(t, e)
	};

	function e(t, e) {
		function i() {
			this.constructor = t
		}
		o(t, e), t.prototype = null === e ? Object.create(e) : (i.prototype = e.prototype, new i)
	}
	var m = function() {
		return (m = Object.assign || function(t) {
			for (var e, i = 1, o = arguments.length; i < o; i++)
				for (var r in e = arguments[i]) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
			return t
		}).apply(this, arguments)
	};

	function v(n, s, a, h) {
		return new(a = a || Promise)(function(t, e) {
			function i(t) {
				try {
					r(h.next(t))
				} catch (t) {
					e(t)
				}
			}

			function o(t) {
				try {
					r(h.throw(t))
				} catch (t) {
					e(t)
				}
			}

			function r(e) {
				e.done ? t(e.value) : new a(function(t) {
					t(e.value)
				}).then(i, o)
			}
			r((h = h.apply(n, s || [])).next())
		})
	}

	function x(i, o) {
		var r, n, s, t, a = {
			label: 0,
			sent: function() {
				if (1 & s[0]) throw s[1];
				return s[1]
			},
			trys: [],
			ops: []
		};
		return t = {
			next: e(0),
			throw: e(1),
			return: e(2)
		}, "function" == typeof Symbol && (t[Symbol.iterator] = function() {
			return this
		}), t;

		function e(e) {
			return function(t) {
				return function(e) {
					if (r) throw new TypeError("Generator is already executing.");
					for (; a;) try {
						if (r = 1, n && (s = 2 & e[0] ? n.return : e[0] ? n.throw || ((s = n.return) && s.call(n), 0) : n.next) && !(
								s = s.call(n, e[1])).done) return s;
						switch (n = 0, s && (e = [2 & e[0], s.value]), e[0]) {
							case 0:
							case 1:
								s = e;
								break;
							case 4:
								return a.label++, {
									value: e[1],
									done: !1
								};
							case 5:
								a.label++, n = e[1], e = [0];
								continue;
							case 7:
								e = a.ops.pop(), a.trys.pop();
								continue;
							default:
								if (!(s = 0 < (s = a.trys).length && s[s.length - 1]) && (6 === e[0] || 2 === e[0])) {
									a = 0;
									continue
								}
								if (3 === e[0] && (!s || e[1] > s[0] && e[1] < s[3])) {
									a.label = e[1];
									break
								}
								if (6 === e[0] && a.label < s[1]) {
									a.label = s[1], s = e;
									break
								}
								if (s && a.label < s[2]) {
									a.label = s[2], a.ops.push(e);
									break
								}
								s[2] && a.ops.pop(), a.trys.pop();
								continue
						}
						e = o.call(i, a)
					} catch (t) {
						e = [6, t], n = 0
					} finally {
						r = s = 0
					}
					if (5 & e[0]) throw e[1];
					return {
						value: e[0] ? e[1] : void 0,
						done: !0
					}
				}([e, t])
			}
		}
	}

	function G() {
		for (var t = 0, e = 0, i = arguments.length; e < i; e++) t += arguments[e].length;
		var o = Array(t),
			r = 0;
		for (e = 0; e < i; e++)
			for (var n = arguments[e], s = 0, a = n.length; s < a; s++, r++) o[r] = n[s];
		return o
	}

	function s(t) {
		return "string" == typeof t
	}

	function a(t) {
		return "function" == typeof t
	}
	var h = {
			order: 0,
			type: "bottom"
		},
		i = (l.getIndexByOrder = function(t, e) {
			for (var i = 0; i < t.length; i += 1)
				if ("top" === e.type) {
					if (t[i].order <= e.order) return i
				} else if (t[i].order < e.order) return i;
			return t.length
		}, l.prototype.on = function(t, e, i) {
			if (!s(t) || !a(e)) return console.warn("on: expect on(type: string, listener: Function)"), this;
			var o = this._listeners[t],
				r = m(m({}, h), i);
			if (o) {
				var n = l.getIndexByOrder(o, r);
				o.splice(n, 0, {
					callback: e,
					order: r.order
				})
			} else this._listeners[t] = [{
				callback: e,
				order: r.order
			}];
			return this
		}, l.prototype.once = function(t, e, i) {
			if (!s(t) || !a(e)) return console.warn("once: expect on(type: string, listener: Function)"), this;
			var o = this._onetimeListeners[t],
				r = m(m({}, h), i);
			if (o) {
				var n = l.getIndexByOrder(o, r);
				o.splice(n, 0, {
					callback: e,
					order: r.order
				})
			} else this._onetimeListeners[t] = [{
				callback: e,
				order: r.order
			}];
			return this
		}, l.prototype.off = function(t, e) {
			if (!s(t) || !a(e)) return console.warn("off: expect on(type: string, listener: Function)"), this;
			for (var i = this._listeners[t] || [], o = i.length - 1; 0 <= o; o -= 1) i[o].callback === e && i.splice(o, 1);
			0 === i.length && delete this._listeners[t];
			var r = this._onetimeListeners[t] || [];
			for (o = r.length - 1; 0 <= o; o -= 1) r[o].callback === e && r.splice(o, 1);
			return 0 === r.length && delete this._onetimeListeners[t], this
		}, l.prototype.fire = function(t, e) {
			for (var i = Array.from(this._listeners[t] || []), o = 0; o < i.length; o += 1) i[o].callback(e);
			var r = Array.from(this._onetimeListeners[t] || []);
			for (o = 0; o < r.length; o += 1) r[o].callback(e);
			return delete this._onetimeListeners[t], this
		}, l.prototype.clearListeners = function() {
			this._listeners = {}, this._onetimeListeners = {}
		}, l.prototype.getListeners = function(t) {
			return this._listeners[t] || this._onetimeListeners[t]
		}, l);

	function l() {
		this._listeners = {}, this._onetimeListeners = {}
	}
	var C = {
		easeInQuad: function(t) {
			return t * t
		},
		easeOutQuad: function(t) {
			return 1 - (1 - t) * (1 - t)
		},
		easeOutQuart: function(t) {
			return 1 - Math.pow(1 - t, 4)
		},
		easeInOutQuad: function(t) {
			return t < .5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2
		},
		linear: function(t) {
			return t
		},
		easeOutCirc: function(t) {
			return Math.sqrt(1 - Math.pow(t - 1, 2))
		},
		easeInSine: function(t) {
			return 1 - Math.cos(t * Math.PI / 2)
		},
		easeOutSine: function(t) {
			return Math.sin(t * Math.PI / 2)
		},
		easeInOutSine: function(t) {
			return -.5 * (Math.cos(Math.PI * t) - 1)
		}
	};

	function u(t, e) {
		for (var i = 0; i < t.length; i += 1) e[t[i]] && (e[t[i]] = e[t[i]].bind(e))
	}

	function r(t, e, i, o) {
		void 0 === o && (o = "center");
		var r = {
			center: [.5, .5],
			top: [.5, 1],
			bottom: [.5, 0],
			left: [0, .5],
			right: [1, .5],
			"top-left": [0, 1],
			"top-right": [1, 1],
			"bottom-left": [0, 0],
			"bottom-right": [1, 0]
		} [o] || [.5, .5];
		return [t[0] - r[0] * e, t[1] + (1 - r[1]) * i, t[0] - r[0] * e, t[1] - r[1] * i, t[0] + (1 - r[0]) * e, t[1] + (1 -
			r[1]) * i, t[0] + (1 - r[0]) * e, t[1] - r[1] * i]
	}

	function p(t, e, i, o) {
		void 0 === o && (o = "center");
		var r = {
			center: [.5, .5],
			top: [.5, 0],
			bottom: [.5, 1],
			left: [0, .5],
			right: [1, .5],
			"top-left": [0, 0],
			"top-right": [1, 0],
			"bottom-left": [0, 1],
			"bottom-right": [1, 1]
		} [o] || [.5, .5];
		return {
			leftBottom: [t[0] - r[0] * e, t[1] - r[1] * i],
			rightTop: [t[0] + (1 - r[0]) * e, t[1] + (1 - r[1]) * i]
		}
	}

	function c(t, e, i, o) {
		return {
			vertices: r(t, e, i, o),
			texCoords: [0, 1, 0, 0, 1, 1, 1, 0]
		}
	}

	function _(t, e) {
		return {
			type: "Feature",
			properties: e,
			geometry: {
				type: "Point",
				coordinates: t
			}
		}
	}

	function w(e) {
		return void 0 === e && (e = 0), new Promise(function(t) {
			setTimeout(t, e)
		})
	}

	function E(t, e, i) {
		return t < e ? e : t < i ? t : i
	}

	function f(t, e) {
		for (var i = 0; i < t.length; i += 1)
			for (var o = 0; o < t.length - i - 1; o += 1)
				if (0 < e(t[o], t[o + 1])) {
					var r = t[o];
					t[o] = t[o + 1], t[o + 1] = r
				}
	}

	function n(t, e) {
		if (!(t instanceof Object && e instanceof Object)) return t === e;
		if (Object.keys(t).length !== Object.keys(e).length) return !1;
		for (var i in t) {
			if (t[i] instanceof Object && e[i] instanceof Object) {
				if (!n(t[i], e[i])) return !1
			} else if (t[i] !== e[i]) return !1
		}
		return !0
	}

	function g(t, e, i) {
		for (var o = Math.ceil(t.length / e), r = 0; r < o; r += 1) {
			var n = r * e,
				s = Math.min((r + 1) * e, t.length);
			i(t.slice(n, s))
		}
	}
	var d, y = Object.freeze({
			__proto__: null,
			bindAll: u,
			createRect: r,
			createScreenBounds: p,
			createPointGeometry: c,
			createFeaturePoint: _,
			sleep: w,
			getFit: E,
			sort: f,
			filter: function(t, e) {
				for (var i = new Set(e), o = [], r = [], n = 0; n < t.length; n += 1) i.has(t[n]) ? r.push(t[n]) : o.push(t[n]);
				return {
					result: o,
					filterResult: r
				}
			},
			equalObject: n,
			step: g
		}),
		L = (e(M, d = i), M.prototype.ofNumber = function(t, e, i) {
			return this._start = {
				num: t
			}, this._end = {
				num: e
			}, this._duration = i, this
		}, M.prototype.ofObject = function(t, e, i) {
			return this._start = m({}, t), this._end = m({}, e), this._duration = i, this
		}, M.prototype.start = function() {
			return this.fire("start"), this._current = m({}, this._start), this._duration <= 0 ? (this._current = m({}, this._end),
					this.fire("update", this._current), this._complete()) : this._timer = requestAnimationFrame(this._updateFrame),
				this
		}, M.prototype._updateFrame = function() {
			if (this._start && this._end) {
				var t = performance.now();
				this._startTimestamp || (this._startTimestamp = t);
				var e = t - this._startTimestamp;
				if (e >= this._duration) this._current = m({}, this._end), this.fire("update", this._current), this._complete();
				else {
					this._timer = requestAnimationFrame(this._updateFrame);
					var i = this._easingFun(e / this._duration);
					for (var o in this._current) {
						var r = this._end[o] - this._start[o];
						this._current[o] = this._start[o] + r * i
					}
					this.fire("update", this._current)
				}
			}
		}, M.prototype.stop = function() {
			this._startTimestamp = 0, this._timer && cancelAnimationFrame(this._timer), this.clearListeners(), this.fire(
				"stop")
		}, M.prototype._complete = function() {
			this._startTimestamp = 0, this._timer && cancelAnimationFrame(this._timer), this.fire("complete", this._current)
		}, M.prototype.easing = function(t) {
			return this._easingFun = C[t], this
		}, M);

	function M() {
		var t = d.call(this) || this;
		return t._current = {}, t._startTimestamp = 0, t._duration = 0, t._easingFun = C.linear, u(["_updateFrame"], t), t
	}
	var T = (b.prototype.setIdentity = function() {
		var t = this._value;
		return t[0] = 1, t[4] = 0, t[8] = 0, t[12] = 0, t[1] = 0, t[5] = 1, t[9] = 0, t[13] = 0, t[2] = 0, t[6] = 0, t[10] =
			1, t[14] = 0, t[3] = 0, t[7] = 0, t[11] = 0, t[15] = 1, this
	}, b.prototype.multiply = function(t) {
		var e, i, o, r, n, s, a, h;
		if (i = this._value, o = this._value, i === (r = t._value))
			for (r = new Float32Array(16), e = 0; e < 16; ++e) r[e] = i[e];
		for (e = 0; e < 4; e++) n = o[e], s = o[e + 4], a = o[e + 8], h = o[e + 12], i[e] = n * r[0] + s * r[1] + a * r[2] +
			h * r[3], i[e + 4] = n * r[4] + s * r[5] + a * r[6] + h * r[7], i[e + 8] = n * r[8] + s * r[9] + a * r[10] + h *
			r[11], i[e + 12] = n * r[12] + s * r[13] + a * r[14] + h * r[15];
		return this
	}, b.prototype.transpose = function() {
		var t, e;
		return e = (t = this._value)[1], t[1] = t[4], t[4] = e, e = t[2], t[2] = t[8], t[8] = e, e = t[3], t[3] = t[12], t[
				12] = e, e = t[6], t[6] = t[9], t[9] = e, e = t[7], t[7] = t[13], t[13] = e, e = t[11], t[11] = t[14], t[14] = e,
			this
	}, b.prototype.invert = function() {
		var t, e, i, o, r;
		if (e = this.getValue(), i = this._value, (o = new Float32Array(16))[0] = e[5] * e[10] * e[15] - e[5] * e[11] * e[
				14] - e[9] * e[6] * e[15] + e[9] * e[7] * e[14] + e[13] * e[6] * e[11] - e[13] * e[7] * e[10], o[4] = -e[4] * e[
				10] * e[15] + e[4] * e[11] * e[14] + e[8] * e[6] * e[15] - e[8] * e[7] * e[14] - e[12] * e[6] * e[11] + e[12] *
			e[7] * e[10], o[8] = e[4] * e[9] * e[15] - e[4] * e[11] * e[13] - e[8] * e[5] * e[15] + e[8] * e[7] * e[13] + e[
				12] * e[5] * e[11] - e[12] * e[7] * e[9], o[12] = -e[4] * e[9] * e[14] + e[4] * e[10] * e[13] + e[8] * e[5] * e[
				14] - e[8] * e[6] * e[13] - e[12] * e[5] * e[10] + e[12] * e[6] * e[9], o[1] = -e[1] * e[10] * e[15] + e[1] * e[
				11] * e[14] + e[9] * e[2] * e[15] - e[9] * e[3] * e[14] - e[13] * e[2] * e[11] + e[13] * e[3] * e[10], o[5] = e[
				0] * e[10] * e[15] - e[0] * e[11] * e[14] - e[8] * e[2] * e[15] + e[8] * e[3] * e[14] + e[12] * e[2] * e[11] - e[
				12] * e[3] * e[10], o[9] = -e[0] * e[9] * e[15] + e[0] * e[11] * e[13] + e[8] * e[1] * e[15] - e[8] * e[3] * e[
				13] - e[12] * e[1] * e[11] + e[12] * e[3] * e[9], o[13] = e[0] * e[9] * e[14] - e[0] * e[10] * e[13] - e[8] * e[
				1] * e[14] + e[8] * e[2] * e[13] + e[12] * e[1] * e[10] - e[12] * e[2] * e[9], o[2] = e[1] * e[6] * e[15] - e[1] *
			e[7] * e[14] - e[5] * e[2] * e[15] + e[5] * e[3] * e[14] + e[13] * e[2] * e[7] - e[13] * e[3] * e[6], o[6] = -e[0] *
			e[6] * e[15] + e[0] * e[7] * e[14] + e[4] * e[2] * e[15] - e[4] * e[3] * e[14] - e[12] * e[2] * e[7] + e[12] * e[
				3] * e[6], o[10] = e[0] * e[5] * e[15] - e[0] * e[7] * e[13] - e[4] * e[1] * e[15] + e[4] * e[3] * e[13] + e[12] *
			e[1] * e[7] - e[12] * e[3] * e[5], o[14] = -e[0] * e[5] * e[14] + e[0] * e[6] * e[13] + e[4] * e[1] * e[14] - e[4] *
			e[2] * e[13] - e[12] * e[1] * e[6] + e[12] * e[2] * e[5], o[3] = -e[1] * e[6] * e[11] + e[1] * e[7] * e[10] + e[5] *
			e[2] * e[11] - e[5] * e[3] * e[10] - e[9] * e[2] * e[7] + e[9] * e[3] * e[6], o[7] = e[0] * e[6] * e[11] - e[0] *
			e[7] * e[10] - e[4] * e[2] * e[11] + e[4] * e[3] * e[10] + e[8] * e[2] * e[7] - e[8] * e[3] * e[6], o[11] = -e[0] *
			e[5] * e[11] + e[0] * e[7] * e[9] + e[4] * e[1] * e[11] - e[4] * e[3] * e[9] - e[8] * e[1] * e[7] + e[8] * e[3] *
			e[5], o[15] = e[0] * e[5] * e[10] - e[0] * e[6] * e[9] - e[4] * e[1] * e[10] + e[4] * e[2] * e[9] + e[8] * e[1] *
			e[6] - e[8] * e[2] * e[5], 0 == (r = e[0] * o[0] + e[1] * o[4] + e[2] * o[8] + e[3] * o[12])) return this;
		for (r = 1 / r, t = 0; t < 16; t++) i[t] = o[t] * r;
		return this
	}, b.prototype.setOrtho = function(t, e, i, o, r, n) {
		var s, a, h, l;
		if (t === e || i === o || r === n) throw "null frustum";
		return a = 1 / (e - t), h = 1 / (o - i), l = 1 / (n - r), (s = this._value)[0] = 2 * a, s[1] = 0, s[2] = 0, s[3] =
			0, s[4] = 0, s[5] = 2 * h, s[6] = 0, s[7] = 0, s[8] = 0, s[9] = 0, s[10] = -2 * l, s[11] = 0, s[12] = -(e + t) *
			a, s[13] = -(o + i) * h, s[14] = -(n + r) * l, s[15] = 1, this
	}, b.prototype.setFrustum = function(t, e, i, o, r, n) {
		var s, a, h, l;
		if (t === e || o === i || r === n) throw "null frustum";
		if (r <= 0) throw "near <= 0";
		if (n <= 0) throw "far <= 0";
		return a = 1 / (e - t), h = 1 / (o - i), l = 1 / (n - r), (s = this._value)[0] = 2 * r * a, s[1] = 0, s[2] = 0, s[
				3] = 0, s[4] = 0, s[5] = 2 * r * h, s[6] = 0, s[7] = 0, s[8] = (e + t) * a, s[9] = (o + i) * h, s[10] = -(n + r) *
			l, s[11] = -1, s[12] = 0, s[13] = 0, s[14] = -2 * r * n * l, s[15] = 0, this
	}, b.prototype.setPerspective = function(t, e, i, o) {
		var r, n, s, a;
		if (i === o || 0 === e) throw "null frustum";
		if (i <= 0) throw "near <= 0";
		if (o <= 0) throw "far <= 0";
		if (t = Math.PI * t / 180 / 2, 0 === (s = Math.sin(t))) throw "null frustum";
		return n = 1 / (o - i), a = Math.cos(t) / s, (r = this._value)[0] = a / e, r[1] = 0, r[2] = 0, r[3] = 0, r[4] = 0,
			r[5] = a, r[6] = 0, r[7] = 0, r[8] = 0, r[9] = 0, r[10] = -(o + i) * n, r[11] = -1, r[12] = 0, r[13] = 0, r[14] = -
			2 * i * o * n, r[15] = 0, this
	}, b.prototype.scale = function(t, e, i) {
		var o = this._value;
		return o[0] *= t, o[4] *= e, o[8] *= i, o[1] *= t, o[5] *= e, o[9] *= i, o[2] *= t, o[6] *= e, o[10] *= i, o[3] *=
			t, o[7] *= e, o[11] *= i, this
	}, b.prototype.translate = function(t, e, i) {
		var o = this._value;
		return o[12] += o[0] * t + o[4] * e + o[8] * i, o[13] += o[1] * t + o[5] * e + o[9] * i, o[14] += o[2] * t + o[6] *
			e + o[10] * i, o[15] += o[3] * t + o[7] * e + o[11] * i, this
	}, b.prototype.rotate = function(t, e, i, o) {
		var r = Math.sqrt(Math.pow(e, 2) + Math.pow(i, 2) + Math.pow(o, 2));
		if (0 === r) return this;
		var n, s, a, h, l, u, _, p, c, f, g, d, y, m, v, x, w, M, T, b, C, E, L, I, R = t / 180 * Math.PI,
			S = this._value;
		return e *= r = 1 / r, i *= r, o *= r, n = Math.sin(R), a = 1 - (s = Math.cos(R)), h = S[0], l = S[1], u = S[2], _ =
			S[3], p = S[4], c = S[5], f = S[6], g = S[7], d = S[8], y = S[9], m = S[10], v = S[11], x = e * e * a + s, w = i *
			e * a + o * n, M = o * e * a - i * n, T = e * i * a - o * n, b = i * i * a + s, C = o * i * a + e * n, E = e * o *
			a + i * n, L = i * o * a - e * n, I = o * o * a + s, S[0] = h * x + p * w + d * M, S[1] = l * x + c * w + y * M,
			S[2] = u * x + f * w + m * M, S[3] = _ * x + g * w + v * M, S[4] = h * T + p * b + d * C, S[5] = l * T + c * b +
			y * C, S[6] = u * T + f * b + m * C, S[7] = _ * T + g * b + v * C, S[8] = h * E + p * L + d * I, S[9] = l * E + c *
			L + y * I, S[10] = u * E + f * L + m * I, S[11] = _ * E + g * L + v * I, this
	}, b.prototype.setLookAt = function(t, e, i) {
		if (3 !== t.length || 3 !== e.length || 3 !== i.length) return console.error("数据格式错误"), this;
		var o, r, n, s, a, h, l, u, _, p, c, f, g = t[0],
			d = t[1],
			y = t[2],
			m = e[0],
			v = e[1],
			x = e[2],
			w = i[0],
			M = i[1],
			T = i[2];
		return r = m - g, n = v - d, s = x - y, h = (n *= a = 1 / Math.sqrt(r * r + n * n + s * s)) * T - (s *= a) * M, l =
			s * w - (r *= a) * T, u = r * M - n * w, p = (l *= _ = 1 / Math.sqrt(h * h + l * l + u * u)) * s - (u *= _) * n,
			c = u * r - (h *= _) * s, f = h * n - l * r, (o = this._value)[0] = h, o[1] = p, o[2] = -r, o[3] = 0, o[4] = l, o[
				5] = c, o[6] = -n, o[7] = 0, o[8] = u, o[9] = f, o[10] = -s, o[11] = 0, o[12] = 0, o[13] = 0, o[14] = 0, o[15] =
			1, this.translate(-g, -d, -y), this
	}, b.prototype.dropShadow = function(t, e) {
		var i = new b,
			o = i.getValue(),
			r = t[0] * e[0] + t[1] * e[1] + t[2] * e[2] + t[3] * e[3];
		return o[0] = r - e[0] * t[0], o[1] = -e[1] * t[0], o[2] = -e[2] * t[0], o[3] = -e[3] * t[0], o[4] = -e[0] * t[1],
			o[5] = r - e[1] * t[1], o[6] = -e[2] * t[1], o[7] = -e[3] * t[1], o[8] = -e[0] * t[2], o[9] = -e[1] * t[2], o[10] =
			r - e[2] * t[2], o[11] = -e[3] * t[2], o[12] = -e[0] * t[3], o[13] = -e[1] * t[3], o[14] = -e[2] * t[3], o[15] =
			r - e[3] * t[3], this.multiply(i)
	}, b.prototype.getValue = function() {
		return this._value
	}, b.prototype.clone = function() {
		return new b(this._value)
	}, b);

	function b(t) {
		if (this._value = new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]), t)
			for (var e = 0; e < t.length; e += 1) this._value[e] = t[e]
	}
	var I = (R.prototype.unit = function() {
		var t = this.getLength();
		return new R([this.x / t, this.y / t, this.z / t, this.w / t])
	}, R.prototype.divide = function(t) {
		return this.x /= t, this.y /= t, this.z /= t, this.w /= t, this
	}, R.prototype.getLength = function() {
		return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2) + Math.pow(this.z, 2) + Math.pow(this.w, 2))
	}, R.prototype.multiplyMat4 = function(t) {
		var e = t.getValue(),
			i = this.x,
			o = this.y,
			r = this.z,
			n = this.w;
		return new R([e[0] * i + e[4] * o + e[8] * r + e[12] * n, e[1] * i + e[5] * o + e[9] * r + e[13] * n, e[2] * i + e[
			6] * o + e[10] * r + e[14] * n, e[3] * i + e[7] * o + e[11] * r + e[15] * n])
	}, R.prototype.clone = function() {
		return new R([this.x, this.y, this.z, this.w])
	}, R.prototype.subtract = function(t) {
		this.x -= t.x, this.y -= t.y, this.z -= t.z, this.w -= t.w
	}, R);

	function R(t, e) {
		e ? (this.x = e[0] - t[0], this.y = e[1] - t[1], this.z = e[2] - t[2], this.w = e[3] - t[3]) : (this.x = t[0], this.y =
			t[1], this.z = t[2], this.w = t[3])
	}
	var S = (P.prototype.set = function(t, e) {
		return this.x = t, this.y = e, this
	}, P.prototype.add = function(t) {
		return this.x += t.x, this.y += t.y, this
	}, P.prototype.subtract = function(t) {
		return this.x -= t.x, this.y -= t.y, this
	}, P.prototype.divide = function(t) {
		return this.x /= t, this.y /= t, this
	}, P.prototype.equal = function(t) {
		return this.x === t.x && this.y === t.y
	}, P.prototype.clone = function() {
		return new P(this.x, this.y)
	}, P.prototype.distanceTo = function(t) {
		return Math.sqrt(Math.pow(this.x - t.x, 2) + Math.pow(this.y - t.y, 2))
	}, P.prototype.rotate = function(t) {
		var e = Math.cos(t),
			i = Math.sin(t),
			o = e * this.x - i * this.y,
			r = i * this.x + e * this.y;
		return this.x = o, this.y = r, this
	}, P.prototype.multiply = function(t) {
		return this.x *= t, this.y *= t, this
	}, P.prototype.getLength = function() {
		return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2))
	}, P);

	function P(t, e) {
		this.x = t, this.y = e
	}
	var F = (A.prototype.setMaxBounds = function(t) {
		this._maxBounds = t, this._constrain()
	}, A.prototype.getMaxBounds = function() {
		return this._maxBounds
	}, A.prototype.setOffset = function(t) {
		this._offset = t, this._calcViewMatrix()
	}, A.prototype.getOffset = function() {
		return [this._offset[0], this._offset[1]]
	}, A.prototype.getFov = function() {
		return this._fov
	}, A.prototype.getFar = function() {
		return this._far
	}, A.prototype.getNear = function() {
		return this._near
	}, A.prototype.resize = function(t, e) {
		this._width = t, this._height = e, this._init()
	}, A.prototype.set = function(t) {
		var e = t.zoom,
			i = t.rotate,
			o = t.pitch,
			r = t.center;
		"number" == typeof e && 0 < e && (this._zoom = e), "number" == typeof i && (this._rotate = A.processRotate(i)),
			"number" == typeof o && (this._pitch = A.processPitch(o)), r && (this._center.set(r.x, r.y), this._constrain()),
			this._calcViewMatrix(), this._calcTextureMatrix(), void 0 !== e && 0 < e && this._calcOnePixelToWorld(), void 0 !==
			i && this._calcNormalMatrix()
	}, A.prototype.setCenterAtPoint = function(t, e) {
		var i = this.screenToWorldCoordinate(e.x, e.y),
			o = t.x - (i.x - this._center.x),
			r = t.y - (i.y - this._center.y);
		this._center.set(o, r), this._constrain(), this._calcViewMatrix()
	}, A.prototype.getCenter = function() {
		return this._center.clone()
	}, A.prototype.getPitch = function() {
		return this._pitch
	}, A.prototype.getRotate = function() {
		return this._rotate
	}, A.prototype.getZoom = function() {
		return this._zoom
	}, A.prototype.setZ = function(t) {
		this._z = t, this._calcViewMatrix()
	}, Object.defineProperty(A.prototype, "viewMatrix", {
		get: function() {
			return this._viewMatrix.getValue()
		},
		enumerable: !0,
		configurable: !0
	}), Object.defineProperty(A.prototype, "projectionMatrix", {
		get: function() {
			return this._projectionMatrix.getValue()
		},
		enumerable: !0,
		configurable: !0
	}), Object.defineProperty(A.prototype, "projectionInvertMatrix", {
		get: function() {
			return this._projectionInvertMatrix.getValue()
		},
		enumerable: !0,
		configurable: !0
	}), Object.defineProperty(A.prototype, "viewInvertMatrix", {
		get: function() {
			return this._viewInvertMatrix.getValue()
		},
		enumerable: !0,
		configurable: !0
	}), Object.defineProperty(A.prototype, "normalMatrix", {
		get: function() {
			return this._normalMatrix.getValue()
		},
		enumerable: !0,
		configurable: !0
	}), A.prototype.getTextureMatrix = function() {
		return this._textureMatrix
	}, Object.defineProperty(A.prototype, "textureMatrix", {
		get: function() {
			return this._textureMatrix.getValue()
		},
		enumerable: !0,
		configurable: !0
	}), A.prototype.getOnePixelToWorld = function() {
		return this._onePixelToWorld
	}, Object.defineProperty(A.prototype, "centerPoint", {
		get: function() {
			return new S(this._width / 2, this._height / 2)
		},
		enumerable: !0,
		configurable: !0
	}), A.prototype._init = function() {
		var t = 2 * Math.tan(this._fov / 2 / 180 * Math.PI);
		this._NATIVE_ZOOM = Math.log2(.11423 * this._height / t) + 19, this._setFar(this._far), this._calcViewMatrix(),
			this._calcNormalMatrix(), this._calcOnePixelToWorld(), this._calcTextureMatrix()
	}, A.prototype._constrain = function() {
		if (this._maxBounds) {
			var t = this._center,
				e = this._width / 2 * this._onePixelToWorld,
				i = this._height / 2 * this._onePixelToWorld,
				o = this._maxBounds.topLeft.x - e,
				r = this._maxBounds.bottomRight.x + e,
				n = this._maxBounds.bottomRight.y - i,
				s = this._maxBounds.topLeft.y + i;
			this._center.set(E(t.x, o, r), E(t.y, n, s))
		}
	}, A.prototype._setFar = function(t) {
		this._far = t, this._projectionMatrix.setPerspective(this._fov, this._width / this._height, this._near, this._far),
			this._projectionInvertMatrix = this._projectionMatrix.clone().invert()
	}, A.prototype._calcTextureMatrix = function() {
		this._textureMatrix = new T, this._textureMatrix.rotate(-this._rotate, 0, 0, 1), this._textureMatrix.rotate(this._pitch,
			1, 0, 0)
	}, A.prototype._calcNormalMatrix = function() {
		this._normalMatrix = new T, this._normalMatrix.rotate(-this._rotate, 0, 0, 1)
	}, A.prototype._calcViewMatrix = function() {
		var t = Math.pow(2, this._NATIVE_ZOOM - this._zoom);
		t > this._far && this._setFar(t + 100);
		var e = {
				x: this._center.x + this._offset[0],
				y: this._center.y + this._offset[1]
			},
			i = A.calcEyeTargetUp(this._rotate, this._pitch, t, e, this._z),
			o = i.eye,
			r = i.target,
			n = i.up;
		this._viewMatrix.setLookAt(o, r, n), this._viewInvertMatrix = this._viewMatrix.clone().invert()
	}, A.prototype._calcOnePixelToWorld = function() {
		var t = Math.pow(2, this._NATIVE_ZOOM - this._zoom),
			e = Math.tan(this._fov / 2 / 180 * Math.PI) * t;
		this._onePixelToWorld = 2 * e / this._height
	}, A.prototype.screenToWorldCoordinate = function(t, e) {
		var i = new I([0, 0, -10, 1]),
			o = new I([0, 0, -1, 1]),
			r = this._viewInvertMatrix.clone().multiply(this._projectionInvertMatrix),
			n = i.multiplyMat4(this._projectionMatrix),
			s = n.z,
			a = n.w,
			h = o.multiplyMat4(this._projectionMatrix),
			l = h.z,
			u = h.w,
			_ = this._width / 2,
			p = this._height / 2,
			c = new I([(t - _) / _ * a, (p - e) / p * a, s, a]).multiplyMat4(r),
			f = new I([(t - _) / _ * u, (p - e) / p * u, l, u]).multiplyMat4(r),
			g = (this._z - c.z) * (c.x - f.x) / (c.z - f.z) + c.x,
			d = (this._z - c.z) * (c.y - f.y) / (c.z - f.z) + c.y;
		return new S(g - this._offset[0], d - this._offset[1])
	}, A.prototype.worldToScreenCoordinate = function(t, e) {
		var i = new I([t + this._offset[0], e + this._offset[1], this._z, 1]).multiplyMat4(this._projectionMatrix.clone().multiply(
				this._viewMatrix)),
			o = (i.x + i.w) / (2 * i.w),
			r = 1 - (i.y + i.w) / (2 * i.w),
			n = o * this._width,
			s = r * this._height;
		return new S(n, s)
	}, A.prototype.getWidth = function() {
		return this._width
	}, A.prototype.getHeight = function() {
		return this._height
	}, A.prototype.getZ = function() {
		return this._z
	}, A.prototype.project = function(t) {
		var e = t.x / this._onePixelToWorld,
			i = t.y / this._onePixelToWorld;
		return new S(e, i)
	}, A.calcEyeTargetUp = function(t, e, i, o, r) {
		var n = [o.x, o.y, r],
			s = -e / 180 * Math.PI,
			a = Math.sin(s),
			h = Math.cos(s),
			l = -t / 180 * Math.PI,
			u = Math.sin(l),
			_ = Math.cos(l),
			p = i * a,
			c = i * h;
		return {
			eye: [-p * u + o.x, p * _ + o.y, c + r],
			target: n,
			up: [-h * u, h * _, -a]
		}
	}, A.processRotate = function(t) {
		var e = ((t - -180) % 360 + 360) % 360 - 180;
		return -180 == e ? 180 : e
	}, A.processPitch = function(t) {
		return t < A.MIN_PITCH ? A.MIN_PITCH : t < A.MAX_PITCH ? t : A.MAX_PITCH
	}, A.normalizeRotate = function(t, e) {
		var i = A.processRotate(t),
			o = Math.abs(i - e);
		return Math.abs(i - 360 - e) < o && (i -= 360), Math.abs(i + 360 - e) < o && (i += 360), i
	}, A.MIN_PITCH = 0, A.MAX_PITCH = 60, A);

	function A(t, e, i) {
		void 0 === i && (i = {}), this._NATIVE_ZOOM = 0, this._onePixelToWorld = 0, this._z = 0, this._viewMatrix = new T,
			this._projectionMatrix = new T, this._projectionInvertMatrix = new T, this._viewInvertMatrix = new T, this._normalMatrix =
			new T, this._textureMatrix = new T, this._far = 9e9, this._fov = 45, this._near = .5, this._center = new S(0, 0),
			this._zoom = 10, this._pitch = 0, this._rotate = 0, this._maxBounds = null, this._offset = [0, 0], this._width = t,
			this._height = e, "number" == typeof i.zoom && (this._zoom = i.zoom), "number" == typeof i.rotate && (this._rotate =
				i.rotate), "number" == typeof i.pitch && (this._pitch = A.processPitch(i.pitch)), this._init()
	}
	var V = (N.prototype._initShader = function(t, e) {
		var i = this._gl.createShader(t);
		i ? (this._gl.shaderSource(i, e), this._gl.compileShader(i), this._gl.attachShader(this._program, i)) : console.error(
			"Shader: createShader failed")
	}, N.prototype.getAttribLocation = function(t) {
		if (this._attributes.has(t)) return this._attributes.get(t);
		var e = this._gl.getAttribLocation(this._program, t);
		return this._attributes.set(t, e), e
	}, N.prototype.getUniformLocation = function(t) {
		if (this._uniforms.has(t)) return this._uniforms.get(t);
		var e = this._gl.getUniformLocation(this._program, t);
		return e && this._uniforms.set(t, e), e
	}, N.prototype.getProgram = function() {
		return this._program
	}, N);

	function N(t, e) {
		this._attributes = new Map, this._uniforms = new Map;
		var i = (this._gl = t).createProgram();
		if (!i) throw new Error("gl: createProgram failed");
		this._program = i;
		var o = e.vertex,
			r = e.fragment;
		this._initShader(this._gl.VERTEX_SHADER, o), this._initShader(this._gl.FRAGMENT_SHADER, r), this._gl.linkProgram(
			this._program)
	}
	var B = {
			fillExtrusion: {
				vertex: "attribute vec4 a_position;attribute vec4 a_normal;uniform bool u_drawLine;uniform float u_height;uniform float u_base;uniform mat4 u_viewMatrix;uniform mat4 u_projectionMatrix;uniform vec4 u_color;uniform mat4 u_normalMatrix;uniform vec3 u_lightPos;uniform vec3 u_ambientColor;uniform vec3 u_ambientMaterial;uniform vec3 u_diffuseColor;uniform vec3 u_diffuseMaterial;varying vec4 v_color;void main(){bool isTopFace=mod(a_normal.z,2.0)>0.0&&a_normal.z>1.0;float height;vec4 originNormal;if(mod(a_normal.z,2.0)>0.0){height=u_height+u_base;if(u_drawLine){height+=0.01;}originNormal=vec4(a_normal.xy,a_normal.z-1.0,1.0);}else{height=u_base;originNormal=a_normal;}gl_Position=u_projectionMatrix*u_viewMatrix*vec4(a_position.xy,height,1.0);vec3 normal=normalize(vec3(u_normalMatrix*originNormal));vec3 lightPos=normalize(u_lightPos);vec3 ambientColor=u_color.rgb*u_ambientColor*u_ambientMaterial;float diffuseIntentsity=max(0.0,dot(lightPos,normal));vec3 diffuseColor=u_color.rgb*u_diffuseColor*u_diffuseMaterial*diffuseIntentsity;v_color=isTopFace ? u_color : vec4(ambientColor+diffuseColor,u_color.a);}",
				fragment: "precision highp float;varying vec4 v_color;uniform float u_opacity;void main(){gl_FragColor=v_color*u_opacity;}"
			},
			fill: {
				vertex: "attribute vec4 a_position;uniform mat4 u_viewMatrix;uniform mat4 u_projectionMatrix;uniform float u_base;void main(){gl_Position=u_projectionMatrix*u_viewMatrix*vec4(a_position.xy,u_base,1.0);}",
				fragment: "precision highp float;uniform vec4 u_color;uniform float u_opacity;void main(){gl_FragColor=u_color*u_opacity;}"
			},
			line: {
				vertex: "attribute vec4 a_position;attribute vec2 a_normal;attribute vec2 a_texCoord;attribute vec3 a_deviation;uniform float u_lineWidth;uniform float u_onePixelToWorld;uniform vec2 u_imgSize;uniform float u_base;uniform mat4 u_viewMatrix;uniform mat4 u_projectionMatrix;varying vec2 v_texCoord;void main(){float halfWidth=u_lineWidth/2.0;vec2 normal=a_normal*halfWidth*u_onePixelToWorld;vec2 deviation=a_deviation.xy*halfWidth*u_onePixelToWorld;if(a_deviation.z!=0.0){float num=length(deviation);if(num>=a_deviation.z){deviation*=0.0;}}vec2 texCoord=a_texCoord.xy;if(a_texCoord.x!=0.0){float lineNum=a_texCoord.x/u_onePixelToWorld/u_imgSize.y;float x=lineNum*(u_imgSize.y/u_imgSize.x)*(u_imgSize.y/u_lineWidth/2.0);texCoord=vec2(x,a_texCoord.y);}v_texCoord=texCoord;vec4 position=vec4(a_position.xy+deviation+normal,u_base,1.0);gl_Position=u_projectionMatrix*u_viewMatrix*position;}",
				fragment: "precision highp float;uniform vec4 u_color;uniform sampler2D u_sampler;uniform bool u_useTexture;uniform float u_opacity;varying vec2 v_texCoord;void main(){vec4 color=u_useTexture ? texture2D(u_sampler,v_texCoord): u_color;gl_FragColor=color*u_opacity;}"
			},
			symbol: {
				vertex: "uniform mat4 u_projectionMatrix;uniform mat4 u_viewMatrix;uniform mat4 u_modelMatrix;uniform vec2 u_position;uniform vec2 u_offset;uniform vec2 u_resolution;uniform float u_base;attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;mat4 translate(mat4 matrix,float x,float y,float z){matrix[3].x+=matrix[0].x*x+matrix[1].x*y+matrix[2].x*z;matrix[3].y+=matrix[0].y*x+matrix[1].y*y+matrix[2].y*z;matrix[3].z+=matrix[0].z*x+matrix[1].z*y+matrix[2].z*z;matrix[3].w+=matrix[0].w*x+matrix[1].w*y+matrix[2].w*z;return matrix;}mat4 scale(mat4 matrix,float x,float y,float z){matrix[0].x*=x;matrix[1].x*=y;matrix[2].x*=z;matrix[0].y*=x;matrix[1].y*=y;matrix[2].y*=z;matrix[0].z*=x;matrix[1].z*=y;matrix[2].z*=z;matrix[0].w*=x;matrix[1].w*=y;matrix[2].w*=z;return matrix;}void main(){mat4 modelMatrix=mat4(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0);modelMatrix=translate(modelMatrix,u_position.x,u_position.y,u_base);vec4 pos=u_viewMatrix*vec4(u_position.xy,u_base,1.0);float scaleNum=pos.z/u_resolution.y*-0.82843;modelMatrix=modelMatrix*scale(u_modelMatrix,scaleNum,scaleNum,scaleNum);modelMatrix=translate(modelMatrix,-u_position.x,-u_position.y,-u_base);mat4 pvm=u_projectionMatrix*u_viewMatrix*modelMatrix;gl_Position=pvm*vec4(a_position.xy+u_offset,a_position.z+u_base,a_position.w);v_texCoord=a_texCoord;}",
				fragment: "precision highp float;uniform sampler2D u_sampler;uniform float u_opacity;varying vec2 v_texCoord;void main(){vec4 color=texture2D(u_sampler,v_texCoord);gl_FragColor=vec4(color.rgb,color.a*u_opacity);}"
			},
			track: {
				vertex: "attribute vec4 a_position;uniform float u_base;uniform mat4 u_viewMatrix;uniform mat4 u_projectionMatrix;void main(){gl_Position=u_projectionMatrix*u_viewMatrix*vec4(a_position.xy,u_base,1.0);gl_PointSize=10.0;}",
				fragment: "precision highp float;uniform highp vec4 u_color;uniform float u_opacity;void main(){gl_FragColor=u_color*u_opacity;}"
			},
			model: {
				vertex: "attribute vec4 a_position;attribute vec2 a_texCoord;attribute vec4 a_normal;uniform mat4 u_projectionMatrix;uniform mat4 u_viewMatrix;uniform vec2 u_position;uniform float u_base;uniform mat4 u_modelMatrix;varying vec2 v_texCoord;varying float v_diffuseIntentsity;uniform mat4 u_normalMatrix;uniform vec3 u_lightPos;void main(){mat4 modelMatrix=mat4(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,u_position.x,u_position.y,u_base,1.0);modelMatrix*=u_modelMatrix;mat4 pvm=u_projectionMatrix*u_viewMatrix*modelMatrix;gl_Position=pvm*a_position;vec3 normal=normalize(vec3(u_normalMatrix*a_normal));vec3 lightPos=normalize(u_lightPos);float diffuseIntentsity=max(0.0,dot(lightPos,normal));v_diffuseIntentsity=diffuseIntentsity;v_texCoord=a_texCoord;}",
				fragment: "precision highp float;uniform bool u_useTexture;uniform sampler2D u_sampler;uniform vec4 u_color;uniform float u_opacity;varying vec2 v_texCoord;varying float v_diffuseIntentsity;uniform vec3 u_ambientColor;uniform vec3 u_ambientMaterial;uniform vec3 u_diffuseColor;uniform vec3 u_diffuseMaterial;void main(){vec4 color=u_useTexture ? texture2D(u_sampler,v_texCoord): u_color;vec3 ambientColor=color.rgb*u_ambientColor*u_ambientMaterial;vec3 diffuseColor=color.rgb*u_diffuseColor*u_diffuseMaterial*v_diffuseIntentsity;gl_FragColor=vec4(ambientColor+diffuseColor,color.a)*u_opacity;}"
			},
			circle: {
				vertex: "attribute vec2 a_normal;uniform mat4 u_projectionMatrix;uniform mat4 u_viewMatrix;uniform vec2 u_position;uniform vec2 u_resolution;uniform float u_base;uniform float u_radius;mat4 translate(mat4 matrix,float x,float y,float z){matrix[3].x+=matrix[0].x*x+matrix[1].x*y+matrix[2].x*z;matrix[3].y+=matrix[0].y*x+matrix[1].y*y+matrix[2].y*z;matrix[3].z+=matrix[0].z*x+matrix[1].z*y+matrix[2].z*z;matrix[3].w+=matrix[0].w*x+matrix[1].w*y+matrix[2].w*z;return matrix;}mat4 scale(mat4 matrix,float x,float y,float z){matrix[0].x*=x;matrix[1].x*=y;matrix[2].x*=z;matrix[0].y*=x;matrix[1].y*=y;matrix[2].y*=z;matrix[0].z*=x;matrix[1].z*=y;matrix[2].z*=z;matrix[0].w*=x;matrix[1].w*=y;matrix[2].w*=z;return matrix;}void main(){mat4 modelMatrix=mat4(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0);modelMatrix=translate(modelMatrix,u_position.x,u_position.y,u_base);vec4 pos=u_viewMatrix*vec4(u_position.xy,u_base,1.0);float scaleNum=pos.z/u_resolution.y*-0.82843*u_radius;modelMatrix=scale(modelMatrix,scaleNum,scaleNum,scaleNum);modelMatrix=translate(modelMatrix,-u_position.x,-u_position.y,-u_base);mat4 pvm=u_projectionMatrix*u_viewMatrix*modelMatrix;vec4 position=vec4(u_position+a_normal,u_base,1.0);gl_Position=pvm*position;}",
				fragment: "precision highp float;uniform vec4 u_color;uniform float u_opacity;void main(){gl_FragColor=u_color*u_opacity;}"
			},
			picture: {
				vertex: "uniform mat4 u_projectionMatrix;uniform mat4 u_viewMatrix;uniform vec2 u_position;uniform float u_base;uniform float u_rotate;attribute vec4 a_position;attribute vec2 a_texCoord;varying vec2 v_texCoord;void main(){float originX=a_position.x-u_position.x;float originY=a_position.y-u_position.y;float rad=radians(u_rotate);float cosNum=cos(rad);float sinNum=sin(rad);float x=cosNum*originX-sinNum*originY;float y=sinNum*originX+cosNum*originY;x=u_position.x+x;y=u_position.y+y;mat4 pvm=u_projectionMatrix*u_viewMatrix;gl_Position=pvm*vec4(x,y,a_position.z+u_base,a_position.w);v_texCoord=a_texCoord;}",
				fragment: "precision highp float;uniform sampler2D u_sampler;uniform float u_opacity;varying vec2 v_texCoord;void main(){gl_FragColor=texture2D(u_sampler,v_texCoord)*u_opacity;}"
			},
			heatmap: {
				vertex: "attribute vec2 a_normal;uniform mat4 u_projectionMatrix;uniform mat4 u_viewMatrix;uniform vec2 u_position;uniform vec2 u_resolution;uniform float u_radius;varying vec4 v_color;mat4 translate(mat4 matrix,float x,float y,float z){matrix[3].x+=matrix[0].x*x+matrix[1].x*y+matrix[2].x*z;matrix[3].y+=matrix[0].y*x+matrix[1].y*y+matrix[2].y*z;matrix[3].z+=matrix[0].z*x+matrix[1].z*y+matrix[2].z*z;matrix[3].w+=matrix[0].w*x+matrix[1].w*y+matrix[2].w*z;return matrix;}mat4 scale(mat4 matrix,float x,float y,float z){matrix[0].x*=x;matrix[1].x*=y;matrix[2].x*=z;matrix[0].y*=x;matrix[1].y*=y;matrix[2].y*=z;matrix[0].z*=x;matrix[1].z*=y;matrix[2].z*=z;matrix[0].w*=x;matrix[1].w*=y;matrix[2].w*=z;return matrix;}void main(){mat4 modelMatrix=mat4(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0);modelMatrix=translate(modelMatrix,u_position.x,u_position.y,0.0);vec4 pos=u_viewMatrix*vec4(u_position.xy,0.0,1.0);float scaleNum=pos.z/u_resolution.y*-0.82843*u_radius;modelMatrix=scale(modelMatrix,scaleNum,scaleNum,scaleNum);modelMatrix=translate(modelMatrix,-u_position.x,-u_position.y,0.0);mat4 pvm=u_projectionMatrix*u_viewMatrix*modelMatrix;vec4 position=vec4(u_position+a_normal,0.0,1.0);gl_Position=pvm*position;v_color=vec4(0.0,0.0,0.0,0.0);if(a_normal.x==0.0&&a_normal.y==0.0){v_color=vec4(0.0,0.0,0.0,1.0);}gl_PointSize=1.0;}",
				fragment: "precision highp float;varying vec4 v_color;void main(){gl_FragColor=v_color;}"
			},
			heatmapTexture: {
				vertex: "attribute vec4 a_position;void main(){gl_Position=a_position;}",
				fragment: "precision highp float;uniform vec2 u_resolution;uniform float u_opacity;uniform sampler2D u_sampler;vec3 getColorByAlpha(float alpha){vec3 color=vec3(0.0,0.0,alpha);if(alpha>0.85){return vec3(1.0,1.0-(alpha-0.85)/0.15,0.0);}else if(alpha>0.55){return vec3((alpha-0.55)/0.3,1.0,0.0);}else if(alpha>0.25){return vec3(0.0,(alpha-0.25)/0.3,1.0-(alpha-0.25)/0.3);}else if(alpha>0.0){return vec3(0.0,0.0,1.0);}return color;}void main(){vec2 texCoord=gl_FragCoord.xy/u_resolution;vec4 color=texture2D(u_sampler,texCoord);gl_FragColor=vec4(getColorByAlpha(color.a),color.a)*u_opacity;}"
			},
			connection: {
				vertex: "attribute vec4 a_position;attribute vec2 a_normal;attribute vec2 a_texCoord;uniform mat4 u_viewMatrix;uniform mat4 u_projectionMatrix;uniform mat4 u_modelMatrix;uniform float u_base;uniform float u_onePixelToWorld;uniform float u_width;uniform vec2 u_imgSize;varying vec2 v_texCoord;mat4 translate(mat4 matrix,float x,float y,float z){matrix[3].x+=matrix[0].x*x+matrix[1].x*y+matrix[2].x*z;matrix[3].y+=matrix[0].y*x+matrix[1].y*y+matrix[2].y*z;matrix[3].z+=matrix[0].z*x+matrix[1].z*y+matrix[2].z*z;matrix[3].w+=matrix[0].w*x+matrix[1].w*y+matrix[2].w*z;return matrix;}void main(){mat4 modelMatrix=mat4(1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0);modelMatrix=translate(modelMatrix,a_position.x,a_position.y,u_base);modelMatrix*=u_modelMatrix;modelMatrix=translate(modelMatrix,-a_position.x,-a_position.y,-u_base);mat4 pvm=u_projectionMatrix*u_viewMatrix*modelMatrix;vec2 normal=a_normal*u_onePixelToWorld*u_width/2.0;gl_Position=pvm*vec4(a_position.x+normal.x,a_position.y,a_position.z+u_base+normal.y,a_position.w);gl_PointSize=10.0;vec2 texCoord=a_texCoord;if(a_texCoord.x!=0.0){float lineNum=a_texCoord.x/u_onePixelToWorld/u_imgSize.y;float x=lineNum*(u_imgSize.y/u_imgSize.x)*(u_imgSize.y/u_width/2.0);texCoord=vec2(x,a_texCoord.y);}v_texCoord=texCoord;}",
				fragment: "precision highp float;uniform vec4 u_color;uniform float u_opacity;uniform sampler2D u_sampler;uniform bool u_useTexture;varying vec2 v_texCoord;void main(){vec4 color=u_useTexture ? texture2D(u_sampler,v_texCoord): u_color;gl_FragColor=color*u_opacity;}"
			}
		},
		k = (O.prototype.resize = function(t, e) {
			this._options.width = t, this._options.height = e, this._frameBuffer && this._frameTexture && (this._initFrameBuffer(),
				this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, null), this._gl.bindTexture(this._gl.TEXTURE_2D, null))
		}, O.prototype._initFrameBuffer = function() {
			var t = this._gl;
			this._frameBuffer = this._gl.createFramebuffer(), this._frameTexture = this._gl.createTexture(), t.bindTexture(t.TEXTURE_2D,
				this._frameTexture);
			var e = this._options,
				i = e.width,
				o = e.height;
			t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, i, o, 0, t.RGBA, t.UNSIGNED_BYTE, null), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER,
				t.LINEAR), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MAG_FILTER, t.LINEAR), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S,
				t.CLAMP_TO_EDGE), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE);
			var r = t.createRenderbuffer();
			t.bindRenderbuffer(t.RENDERBUFFER, r), t.renderbufferStorage(t.RENDERBUFFER, t.DEPTH_COMPONENT16, i, o), t.bindFramebuffer(
				t.FRAMEBUFFER, this._frameBuffer), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, this
				._frameTexture, 0), t.bindRenderbuffer(t.RENDERBUFFER, null)
		}, O.prototype.enableFrameBuffer = function() {
			this._frameBuffer && this._frameTexture ? (this._gl.bindTexture(this._gl.TEXTURE_2D, this._frameTexture), this._gl
				.bindFramebuffer(this._gl.FRAMEBUFFER, this._frameBuffer)) : this._initFrameBuffer()
		}, O.prototype.use = function(t) {
			if (this._activeProgramName !== t) {
				this._activeProgramName = t;
				var e = this._programMap.get(t);
				e || (e = new V(this._gl, B[t]), this._programMap.set(t, e)), this._gl.useProgram(e.getProgram())
			}
		}, O.prototype.getActiveProgram = function() {
			return this._activeProgramName ? this._programMap.get(this._activeProgramName) : null
		}, O.prototype.clear = function() {
			this._frameBuffer && (this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, this._frameBuffer), this._gl.clear(this._gl.DEPTH_BUFFER_BIT |
				this._gl.COLOR_BUFFER_BIT), this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, null)), this._gl.clear(this._gl.DEPTH_BUFFER_BIT |
				this._gl.COLOR_BUFFER_BIT)
		}, O.prototype.enableAlpha = function() {
			this._isEnableAlpha || this._gl.enable(this._gl.BLEND), this._isEnableAlpha = !0
		}, O.prototype.disableAlpha = function() {
			this._isEnableAlpha && (this._isEnableAlpha = !1, this._gl.disable(this._gl.BLEND))
		}, O.prototype.initArrayBuffer = function(t, e, i) {
			if (-1 !== t) {
				var o = this._gl.createBuffer();
				this._gl.bindBuffer(this._gl.ARRAY_BUFFER, o), this._gl.bufferData(this._gl.ARRAY_BUFFER, e, this._gl.STATIC_DRAW);
				var r = e.BYTES_PER_ELEMENT;
				this._gl.vertexAttribPointer(t, i, this._gl.FLOAT, !1, i * r, 0), this._gl.enableVertexAttribArray(t)
			}
		}, O.prototype.initIndexBuffer = function(t) {
			var e = new Uint16Array(t),
				i = this._gl.createBuffer();
			this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, i), this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, e, this._gl
				.STATIC_DRAW)
		}, O.prototype.enableDepthTest = function() {
			this._isEnableDepthTest || (this._isEnableDepthTest = !0, this._gl.enable(this._gl.DEPTH_TEST))
		}, O.prototype.disableDepthTest = function() {
			this._isEnableDepthTest && (this._isEnableDepthTest = !1, this._gl.disable(this._gl.DEPTH_TEST))
		}, O.prototype.getViewRect = function() {
			return {
				width: this._options.width,
				height: this._options.height
			}
		}, O);

	function O(t, e) {
		this._programMap = new Map, this._isEnableDepthTest = !1, this._isEnableAlpha = !1, this._gl = t, this._options = e,
			this._gl.activeTexture(this._gl.TEXTURE0), this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL, 1)
	}

	function z(t) {
		function e() {
			this._url = URL.createObjectURL(new Blob([t])), this._worker = new Worker(this._url)
		}
		return e.prototype.addEventListener = function(t, e) {
			this._worker.addEventListener(t, e)
		}, e.prototype.removeEventListener = function(t, e) {
			this._worker.removeEventListener(t, e)
		}, e.prototype.terminate = function() {
			this._worker.terminate(), URL.revokeObjectURL(this._url)
		}, e.prototype.postMessage = function(t, e) {
			this._worker.postMessage(t, e)
		}, Object.defineProperty(e.prototype, "onmessage", {
			get: function() {
				return this._worker.onmessage
			},
			set: function(t) {
				this._worker.onmessage = t
			},
			enumerable: !0,
			configurable: !0
		}), Object.defineProperty(e.prototype, "onerror", {
			get: function() {
				return this._worker.onerror
			},
			set: function(t) {
				this._worker.onerror = t
			},
			enumerable: !0,
			configurable: !0
		}), e
	}
	var D, U = z(
			'!function(){"use strict";var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function t(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var u=function(){return(u=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function A(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var o=Array(t),r=0;for(e=0;e<i;e++)for(var n=arguments[e],s=0,a=n.length;s<a;s++,r++)o[r]=n[s];return o}var y=(n.prototype.setIdentity=function(){var t=this._value;return t[0]=1,t[4]=0,t[8]=0,t[12]=0,t[1]=0,t[5]=1,t[9]=0,t[13]=0,t[2]=0,t[6]=0,t[10]=1,t[14]=0,t[3]=0,t[7]=0,t[11]=0,t[15]=1,this},n.prototype.multiply=function(t){var e,i,o,r,n,s,a,l;if(i=this._value,o=this._value,i===(r=t._value))for(r=new Float32Array(16),e=0;e<16;++e)r[e]=i[e];for(e=0;e<4;e++)n=o[e],s=o[e+4],a=o[e+8],l=o[e+12],i[e]=n*r[0]+s*r[1]+a*r[2]+l*r[3],i[e+4]=n*r[4]+s*r[5]+a*r[6]+l*r[7],i[e+8]=n*r[8]+s*r[9]+a*r[10]+l*r[11],i[e+12]=n*r[12]+s*r[13]+a*r[14]+l*r[15];return this},n.prototype.transpose=function(){var t,e;return e=(t=this._value)[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this},n.prototype.invert=function(){var t,e,i,o,r;if(e=this.getValue(),i=this._value,(o=new Float32Array(16))[0]=e[5]*e[10]*e[15]-e[5]*e[11]*e[14]-e[9]*e[6]*e[15]+e[9]*e[7]*e[14]+e[13]*e[6]*e[11]-e[13]*e[7]*e[10],o[4]=-e[4]*e[10]*e[15]+e[4]*e[11]*e[14]+e[8]*e[6]*e[15]-e[8]*e[7]*e[14]-e[12]*e[6]*e[11]+e[12]*e[7]*e[10],o[8]=e[4]*e[9]*e[15]-e[4]*e[11]*e[13]-e[8]*e[5]*e[15]+e[8]*e[7]*e[13]+e[12]*e[5]*e[11]-e[12]*e[7]*e[9],o[12]=-e[4]*e[9]*e[14]+e[4]*e[10]*e[13]+e[8]*e[5]*e[14]-e[8]*e[6]*e[13]-e[12]*e[5]*e[10]+e[12]*e[6]*e[9],o[1]=-e[1]*e[10]*e[15]+e[1]*e[11]*e[14]+e[9]*e[2]*e[15]-e[9]*e[3]*e[14]-e[13]*e[2]*e[11]+e[13]*e[3]*e[10],o[5]=e[0]*e[10]*e[15]-e[0]*e[11]*e[14]-e[8]*e[2]*e[15]+e[8]*e[3]*e[14]+e[12]*e[2]*e[11]-e[12]*e[3]*e[10],o[9]=-e[0]*e[9]*e[15]+e[0]*e[11]*e[13]+e[8]*e[1]*e[15]-e[8]*e[3]*e[13]-e[12]*e[1]*e[11]+e[12]*e[3]*e[9],o[13]=e[0]*e[9]*e[14]-e[0]*e[10]*e[13]-e[8]*e[1]*e[14]+e[8]*e[2]*e[13]+e[12]*e[1]*e[10]-e[12]*e[2]*e[9],o[2]=e[1]*e[6]*e[15]-e[1]*e[7]*e[14]-e[5]*e[2]*e[15]+e[5]*e[3]*e[14]+e[13]*e[2]*e[7]-e[13]*e[3]*e[6],o[6]=-e[0]*e[6]*e[15]+e[0]*e[7]*e[14]+e[4]*e[2]*e[15]-e[4]*e[3]*e[14]-e[12]*e[2]*e[7]+e[12]*e[3]*e[6],o[10]=e[0]*e[5]*e[15]-e[0]*e[7]*e[13]-e[4]*e[1]*e[15]+e[4]*e[3]*e[13]+e[12]*e[1]*e[7]-e[12]*e[3]*e[5],o[14]=-e[0]*e[5]*e[14]+e[0]*e[6]*e[13]+e[4]*e[1]*e[14]-e[4]*e[2]*e[13]-e[12]*e[1]*e[6]+e[12]*e[2]*e[5],o[3]=-e[1]*e[6]*e[11]+e[1]*e[7]*e[10]+e[5]*e[2]*e[11]-e[5]*e[3]*e[10]-e[9]*e[2]*e[7]+e[9]*e[3]*e[6],o[7]=e[0]*e[6]*e[11]-e[0]*e[7]*e[10]-e[4]*e[2]*e[11]+e[4]*e[3]*e[10]+e[8]*e[2]*e[7]-e[8]*e[3]*e[6],o[11]=-e[0]*e[5]*e[11]+e[0]*e[7]*e[9]+e[4]*e[1]*e[11]-e[4]*e[3]*e[9]-e[8]*e[1]*e[7]+e[8]*e[3]*e[5],o[15]=e[0]*e[5]*e[10]-e[0]*e[6]*e[9]-e[4]*e[1]*e[10]+e[4]*e[2]*e[9]+e[8]*e[1]*e[6]-e[8]*e[2]*e[5],0==(r=e[0]*o[0]+e[1]*o[4]+e[2]*o[8]+e[3]*o[12]))return this;for(r=1/r,t=0;t<16;t++)i[t]=o[t]*r;return this},n.prototype.setOrtho=function(t,e,i,o,r,n){var s,a,l,h;if(t===e||i===o||r===n)throw"null frustum";return a=1/(e-t),l=1/(o-i),h=1/(n-r),(s=this._value)[0]=2*a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*l,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-2*h,s[11]=0,s[12]=-(e+t)*a,s[13]=-(o+i)*l,s[14]=-(n+r)*h,s[15]=1,this},n.prototype.setFrustum=function(t,e,i,o,r,n){var s,a,l,h;if(t===e||o===i||r===n)throw"null frustum";if(r<=0)throw"near <= 0";if(n<=0)throw"far <= 0";return a=1/(e-t),l=1/(o-i),h=1/(n-r),(s=this._value)[0]=2*r*a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*r*l,s[6]=0,s[7]=0,s[8]=(e+t)*a,s[9]=(o+i)*l,s[10]=-(n+r)*h,s[11]=-1,s[12]=0,s[13]=0,s[14]=-2*r*n*h,s[15]=0,this},n.prototype.setPerspective=function(t,e,i,o){var r,n,s,a;if(i===o||0===e)throw"null frustum";if(i<=0)throw"near <= 0";if(o<=0)throw"far <= 0";if(t=Math.PI*t/180/2,0===(s=Math.sin(t)))throw"null frustum";return n=1/(o-i),a=Math.cos(t)/s,(r=this._value)[0]=a/e,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=-(o+i)*n,r[11]=-1,r[12]=0,r[13]=0,r[14]=-2*i*o*n,r[15]=0,this},n.prototype.scale=function(t,e,i){var o=this._value;return o[0]*=t,o[4]*=e,o[8]*=i,o[1]*=t,o[5]*=e,o[9]*=i,o[2]*=t,o[6]*=e,o[10]*=i,o[3]*=t,o[7]*=e,o[11]*=i,this},n.prototype.translate=function(t,e,i){var o=this._value;return o[12]+=o[0]*t+o[4]*e+o[8]*i,o[13]+=o[1]*t+o[5]*e+o[9]*i,o[14]+=o[2]*t+o[6]*e+o[10]*i,o[15]+=o[3]*t+o[7]*e+o[11]*i,this},n.prototype.rotate=function(t,e,i,o){var r=Math.sqrt(Math.pow(e,2)+Math.pow(i,2)+Math.pow(o,2));if(0===r)return this;var n,s,a,l,h,u,p,y,c,f,v,g,x,_,d,m,w,M,S,b,z,P,I,C,E=t/180*Math.PI,T=this._value;return e*=r=1/r,i*=r,o*=r,n=Math.sin(E),a=1-(s=Math.cos(E)),l=T[0],h=T[1],u=T[2],p=T[3],y=T[4],c=T[5],f=T[6],v=T[7],g=T[8],x=T[9],_=T[10],d=T[11],m=e*e*a+s,w=i*e*a+o*n,M=o*e*a-i*n,S=e*i*a-o*n,b=i*i*a+s,z=o*i*a+e*n,P=e*o*a+i*n,I=i*o*a-e*n,C=o*o*a+s,T[0]=l*m+y*w+g*M,T[1]=h*m+c*w+x*M,T[2]=u*m+f*w+_*M,T[3]=p*m+v*w+d*M,T[4]=l*S+y*b+g*z,T[5]=h*S+c*b+x*z,T[6]=u*S+f*b+_*z,T[7]=p*S+v*b+d*z,T[8]=l*P+y*I+g*C,T[9]=h*P+c*I+x*C,T[10]=u*P+f*I+_*C,T[11]=p*P+v*I+d*C,this},n.prototype.setLookAt=function(t,e,i){if(3!==t.length||3!==e.length||3!==i.length)return console.error("数据格式错误"),this;var o,r,n,s,a,l,h,u,p,y,c,f,v=t[0],g=t[1],x=t[2],_=e[0],d=e[1],m=e[2],w=i[0],M=i[1],S=i[2];return r=_-v,n=d-g,s=m-x,l=(n*=a=1/Math.sqrt(r*r+n*n+s*s))*S-(s*=a)*M,h=s*w-(r*=a)*S,u=r*M-n*w,y=(h*=p=1/Math.sqrt(l*l+h*h+u*u))*s-(u*=p)*n,c=u*r-(l*=p)*s,f=l*n-h*r,(o=this._value)[0]=l,o[1]=y,o[2]=-r,o[3]=0,o[4]=h,o[5]=c,o[6]=-n,o[7]=0,o[8]=u,o[9]=f,o[10]=-s,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,this.translate(-v,-g,-x),this},n.prototype.dropShadow=function(t,e){var i=new n,o=i.getValue(),r=t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3];return o[0]=r-e[0]*t[0],o[1]=-e[1]*t[0],o[2]=-e[2]*t[0],o[3]=-e[3]*t[0],o[4]=-e[0]*t[1],o[5]=r-e[1]*t[1],o[6]=-e[2]*t[1],o[7]=-e[3]*t[1],o[8]=-e[0]*t[2],o[9]=-e[1]*t[2],o[10]=r-e[2]*t[2],o[11]=-e[3]*t[2],o[12]=-e[0]*t[3],o[13]=-e[1]*t[3],o[14]=-e[2]*t[3],o[15]=r-e[3]*t[3],this.multiply(i)},n.prototype.getValue=function(){return this._value},n.prototype.clone=function(){return new n(this._value)},n);function n(t){if(this._value=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),t)for(var e=0;e<t.length;e+=1)this._value[e]=t[e]}var l=(s.prototype.unit=function(){var t=this.getLength();return new s([this.x/t,this.y/t,this.z/t,this.w/t])},s.prototype.divide=function(t){return this.x/=t,this.y/=t,this.z/=t,this.w/=t,this},s.prototype.getLength=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2)+Math.pow(this.z,2)+Math.pow(this.w,2))},s.prototype.multiplyMat4=function(t){var e=t.getValue(),i=this.x,o=this.y,r=this.z,n=this.w;return new s([e[0]*i+e[4]*o+e[8]*r+e[12]*n,e[1]*i+e[5]*o+e[9]*r+e[13]*n,e[2]*i+e[6]*o+e[10]*r+e[14]*n,e[3]*i+e[7]*o+e[11]*r+e[15]*n])},s.prototype.clone=function(){return new s([this.x,this.y,this.z,this.w])},s.prototype.subtract=function(t){this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w},s);function s(t,e){e?(this.x=e[0]-t[0],this.y=e[1]-t[1],this.z=e[2]-t[2],this.w=e[3]-t[3]):(this.x=t[0],this.y=t[1],this.z=t[2],this.w=t[3])}function b(t,e,i,o){void 0===o&&(o="center");var r={center:[.5,.5],top:[.5,0],bottom:[.5,1],left:[0,.5],right:[1,.5],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]}[o]||[.5,.5];return{leftBottom:[t[0]-r[0]*e,t[1]-r[1]*i],rightTop:[t[0]+(1-r[0])*e,t[1]+(1-r[1])*i]}}function c(t,e,i,o){return{vertices:function(t,e,i,o){void 0===o&&(o="center");var r={center:[.5,.5],top:[.5,1],bottom:[.5,0],left:[0,.5],right:[1,.5],"top-left":[0,1],"top-right":[1,1],"bottom-left":[0,0],"bottom-right":[1,0]}[o]||[.5,.5];return[t[0]-r[0]*e,t[1]+(1-r[1])*i,t[0]-r[0]*e,t[1]-r[1]*i,t[0]+(1-r[0])*e,t[1]+(1-r[1])*i,t[0]+(1-r[0])*e,t[1]-r[1]*i]}(t,e,i,o),texCoords:[0,1,0,0,1,1,1,0]}}function h(t,e){for(var i=new Set(e),o=[],r=[],n=0;n<t.length;n+=1)i.has(t[n])?r.push(t[n]):o.push(t[n]);return{result:o,filterResult:r}}function z(t,e){for(var i=0;i<t.length;i+=1)for(var o=0;o<e.length;o+=1){var r=t[i].leftBottom,n=r[0],s=r[1],a=t[i].rightTop,l=a[0],h=a[1],u=e[o].leftBottom,p=u[0],y=u[1],c=e[o].rightTop,f=c[0],v=c[1],g=Math.abs(n+l-p-f),x=Math.abs(n-l)+Math.abs(p-f),_=Math.abs(s+h-y-v),d=Math.abs(s-h)+Math.abs(y-v);if(g<=x&&_<=d)return!0}return!1}var r,a=(e.prototype.updateOptions=function(t){this._view=t.view,this._viewMatrix=new y(t.viewMatrix),this._projectionMatrix=new y(t.projectionMatrix),this._zoom=t.zoom,this._z=t.z,this._center=t.center,this._onePixelToWorld=t.onePixelToWorld;var e=this._view,i=e.viewWidth,o=e.viewHeight;this._max=Math.sqrt(Math.pow(i,2)+Math.pow(o,2))/2/this._viewMatrix.getValue()[10]},e.prototype._checkCenter=function(t){return Math.sqrt(Math.pow(t[0]-this._center.x,2)+Math.pow(t[1]-this._center.y,2))/this._onePixelToWorld*this._viewMatrix.getValue()[10]<=this._max},e.prototype.calculate=function(t){for(var e=this,i=new Map,o=0;o<t.length;o+=1)for(var r=0;r<t[o].data.length;r+=1){var n=t[o].data[r],s=n.zoomRange,a=n.point;if(this._checkZoomRange(s)&&this._checkCenter(a)){var l=i.get(t[o].floorId);l?l.push(u({id:t[o].id,index:r},t[o].data[r])):i.set(t[o].floorId,[u({id:t[o].id,index:r},t[o].data[r])])}}var h=new Map;return i.forEach(function(t){e._calculateFloor(t).forEach(function(t,e){h.set(e,t)})}),this._generateResult(h)},e.prototype._generateResult=function(r){var s=this,a={},n={},l={};return r.forEach(function(t,e){var i=s._lastResult.get(e);if(i){var o=h(t,i),r=o.result,n=o.filterResult;a[e]=r,l[e]=n}else a[e]=t}),this._lastResult.forEach(function(t,e){var i=r.get(e);if(i){var o=h(t,i).result;n[e]=o}else n[e]=t}),this._lastResult=r,{hideResult:n,showResult:a,normalResult:l}},e.prototype._checkZoomRange=function(t){return!t||(null===t[0]||t[0]<=this._zoom)&&(null===t[1]||this._zoom<t[1])},e.prototype._calculateFloor=function(t){!function(t,e){for(var i=0;i<t.length;i+=1)for(var o=0;o<t.length-i-1;o+=1)if(0<e(t[o],t[o+1])){var r=t[o];t[o]=t[o+1],t[o+1]=r}}(t,function(t,e){return e.weight-t.weight});for(var e=new Map,i=[],o=0;o<t.length;o+=1){for(var r=t[o],n=r.point,s=r.id,a=r.data,l=r.margin,h=r.index,u=this._worldToScreenCoordinate(n),p=[],y=0;y<a.length;y+=1){var c=a[y],f=c.offset,v=c.width,g=c.height,x=c.anchor,_=u.x,d=u.y,m=b([_-f[0],d-f[1]],v,g,x),w=[m.leftBottom[0]-l,m.leftBottom[1]-l],M=[m.rightTop[0]+l,m.rightTop[1]+l];p.push({leftBottom:w,rightTop:M})}if(this._isInView(u)&&!z(i,p)){i.push.apply(i,p);var S=e.get(s);S?S.push(h):e.set(s,[h])}}return e},e.prototype._worldToScreenCoordinate=function(t){var e=t[0],i=t[1],o=new l([e,i,this._z,1]),r=this._projectionMatrix.clone().multiply(this._viewMatrix),n=o.multiplyMat4(r),s=(n.x+n.w)/(2*n.w),a=1-(n.y+n.w)/(2*n.w);return{x:s*=this._view.viewWidth,y:a*=this._view.viewHeight}},e.prototype._isInView=function(t){return 0<=t.x&&t.x<this._view.viewWidth&&0<=t.y&&t.y<this._view.viewHeight},e);function e(t){this._lastResult=new Map,this._view=t.view,this._viewMatrix=new y(t.viewMatrix),this._projectionMatrix=new y(t.projectionMatrix),this._zoom=t.zoom,this._z=t.z,this._center=t.center,this._onePixelToWorld=t.onePixelToWorld,this._max=Math.sqrt(Math.pow(this._view.viewWidth,2)+Math.pow(this._view.viewHeight,2))/2}var O=p,i=p;function p(t,e,i){i=i||2;var o,r,n,s,a,l,h,u=e&&e.length,p=u?e[0]*i:t.length,y=v(t,0,p,i,!0),c=[];if(!y||y.next===y.prev)return c;if(u&&(y=function(t,e,i,o){var r,n,s,a,l,h=[];for(r=0,n=e.length;r<n;r++)s=e[r]*o,a=r<n-1?e[r+1]*o:t.length,(l=v(t,s,a,o,!1))===l.next&&(l.steiner=!0),h.push(P(l));for(h.sort(w),r=0;r<h.length;r++)M(h[r],i),i=g(i,i.next);return i}(t,e,y,i)),t.length>80*i){o=n=t[0],r=s=t[1];for(var f=i;f<p;f+=i)(a=t[f])<o&&(o=a),(l=t[f+1])<r&&(r=l),n<a&&(n=a),s<l&&(s=l);h=0!==(h=Math.max(n-o,s-r))?1/h:0}return x(y,c,i,o,r,h),c}function v(t,e,i,o,r){var n,s;if(r===0<V(t,e,i,o))for(n=e;n<i;n+=o)s=G(n,t[n],t[n+1],s);else for(n=i-o;e<=n;n-=o)s=G(n,t[n],t[n+1],s);return s&&E(s,s.next)&&(K(s),s=s.next),s}function g(t,e){if(!t)return t;e=e||t;var i,o=t;do{if(i=!1,o.steiner||!E(o,o.next)&&0!==C(o.prev,o,o.next))o=o.next;else{if(K(o),(o=e=o.prev)===o.next)break;i=!0}}while(i||o!==e);return e}function x(t,e,i,o,r,n,s){if(t){!s&&n&&function(t,e,i,o){var r=t;for(;null===r.z&&(r.z=S(r.x,r.y,e,i,o)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next,r!==t;);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,o,r,n,s,a,l,h=1;do{for(i=t,n=t=null,s=0;i;){for(s++,o=i,e=a=0;e<h&&(a++,o=o.nextZ);e++);for(l=h;0<a||0<l&&o;)0!==a&&(0===l||!o||i.z<=o.z)?(i=(r=i).nextZ,a--):(o=(r=o).nextZ,l--),n?n.nextZ=r:t=r,r.prevZ=n,n=r;i=o}n.nextZ=null,h*=2}while(1<s)}(r)}(t,o,r,n);for(var a,l,h=t;t.prev!==t.next;)if(a=t.prev,l=t.next,n?_(t,o,r,n):f(t))e.push(a.i/i),e.push(t.i/i),e.push(l.i/i),K(t),t=l.next,h=l.next;else if((t=l)===h){s?1===s?x(t=d(g(t),e,i),e,i,o,r,n,2):2===s&&m(t,e,i,o,r,n):x(g(t),e,i,o,r,n,1);break}}}function f(t){var e=t.prev,i=t,o=t.next;if(0<=C(e,i,o))return!1;for(var r=t.next.next;r!==t.prev;){if(I(e.x,e.y,i.x,i.y,o.x,o.y,r.x,r.y)&&0<=C(r.prev,r,r.next))return!1;r=r.next}return!0}function _(t,e,i,o){var r=t.prev,n=t,s=t.next;if(0<=C(r,n,s))return!1;for(var a=r.x<n.x?r.x<s.x?r.x:s.x:n.x<s.x?n.x:s.x,l=r.y<n.y?r.y<s.y?r.y:s.y:n.y<s.y?n.y:s.y,h=r.x>n.x?r.x>s.x?r.x:s.x:n.x>s.x?n.x:s.x,u=r.y>n.y?r.y>s.y?r.y:s.y:n.y>s.y?n.y:s.y,p=S(a,l,e,i,o),y=S(h,u,e,i,o),c=t.prevZ,f=t.nextZ;c&&c.z>=p&&f&&f.z<=y;){if(c!==t.prev&&c!==t.next&&I(r.x,r.y,n.x,n.y,s.x,s.y,c.x,c.y)&&0<=C(c.prev,c,c.next))return!1;if(c=c.prevZ,f!==t.prev&&f!==t.next&&I(r.x,r.y,n.x,n.y,s.x,s.y,f.x,f.y)&&0<=C(f.prev,f,f.next))return!1;f=f.nextZ}for(;c&&c.z>=p;){if(c!==t.prev&&c!==t.next&&I(r.x,r.y,n.x,n.y,s.x,s.y,c.x,c.y)&&0<=C(c.prev,c,c.next))return!1;c=c.prevZ}for(;f&&f.z<=y;){if(f!==t.prev&&f!==t.next&&I(r.x,r.y,n.x,n.y,s.x,s.y,f.x,f.y)&&0<=C(f.prev,f,f.next))return!1;f=f.nextZ}return!0}function d(t,e,i){var o=t;do{var r=o.prev,n=o.next.next;!E(r,n)&&T(r,o,o.next,n)&&Y(r,n)&&Y(n,r)&&(e.push(r.i/i),e.push(o.i/i),e.push(n.i/i),K(o),K(o.next),o=t=n),o=o.next}while(o!==t);return g(o)}function m(t,e,i,o,r,n){var s,a,l=t;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&(a=h,(s=l).next.i!==a.i&&s.prev.i!==a.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&T(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(s,a)&&(Y(s,a)&&Y(a,s)&&function(t,e){var i=t,o=!1,r=(t.x+e.x)/2,n=(t.y+e.y)/2;for(;i.y>n!=i.next.y>n&&i.next.y!==i.y&&r<(i.next.x-i.x)*(n-i.y)/(i.next.y-i.y)+i.x&&(o=!o),i=i.next,i!==t;);return o}(s,a)&&(C(s.prev,s,a.prev)||C(s,a.prev,a))||E(s,a)&&0<C(s.prev,s,s.next)&&0<C(a.prev,a,a.next)))){var u=L(l,h);return l=g(l,l.next),u=g(u,u.next),x(l,e,i,o,r,n),void x(u,e,i,o,r,n)}h=h.next}l=l.next}while(l!==t)}function w(t,e){return t.x-e.x}function M(t,e){if(e=function(t,e){var i,o=e,r=t.x,n=t.y,s=-1/0;do{if(n<=o.y&&n>=o.next.y&&o.next.y!==o.y){var a=o.x+(n-o.y)*(o.next.x-o.x)/(o.next.y-o.y);if(a<=r&&s<a){if((s=a)===r){if(n===o.y)return o;if(n===o.next.y)return o.next}i=o.x<o.next.x?o:o.next}}o=o.next}while(o!==e);if(!i)return null;if(r===s)return i;var l,h=i,u=i.x,p=i.y,y=1/0;o=i;for(;r>=o.x&&o.x>=u&&r!==o.x&&I(n<p?r:s,n,u,p,n<p?s:r,n,o.x,o.y)&&(l=Math.abs(n-o.y)/(r-o.x),Y(o,t)&&(l<y||l===y&&(o.x>i.x||o.x===i.x&&(f=o,C((c=i).prev,c,f.prev)<0&&C(f.next,c,c.next)<0)))&&(i=o,y=l)),o=o.next,o!==h;);var c,f;return i}(t,e)){var i=L(e,t);g(i,i.next)}}function S(t,e,i,o,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-o)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function P(t){for(var e=t,i=t;(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),(e=e.next)!==t;);return i}function I(t,e,i,o,r,n,s,a){return 0<=(r-s)*(e-a)-(t-s)*(n-a)&&0<=(t-s)*(o-a)-(i-s)*(e-a)&&0<=(i-s)*(n-a)-(r-s)*(o-a)}function C(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function E(t,e){return t.x===e.x&&t.y===e.y}function T(t,e,i,o){var r=Z(C(t,e,i)),n=Z(C(t,e,o)),s=Z(C(i,o,t)),a=Z(C(i,o,e));return r!==n&&s!==a||(!(0!==r||!R(t,i,e))||(!(0!==n||!R(t,o,e))||(!(0!==s||!R(i,t,o))||!(0!==a||!R(i,e,o)))))}function R(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function Z(t){return 0<t?1:t<0?-1:0}function Y(t,e){return C(t.prev,t,t.next)<0?0<=C(t,e,t.next)&&0<=C(t,t.prev,e):C(t,e,t.prev)<0||C(t,t.next,e)<0}function L(t,e){var i=new j(t.i,t.x,t.y),o=new j(e.i,e.x,e.y),r=t.next,n=e.prev;return(t.next=e).prev=t,(i.next=r).prev=i,(o.next=i).prev=o,(n.next=o).prev=n,o}function G(t,e,i,o){var r=new j(t,e,i);return o?(r.next=o.next,(r.prev=o).next.prev=r,o.next=r):(r.prev=r).next=r,r}function K(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function j(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function V(t,e,i,o){for(var r=0,n=e,s=i-o;n<i;n+=o)r+=(t[s]-t[n])*(t[n+1]+t[s+1]),s=n;return r}p.deviation=function(t,e,i,o){var r=e&&e.length,n=r?e[0]*i:t.length,s=Math.abs(V(t,0,n,i));if(r)for(var a=0,l=e.length;a<l;a++){var h=e[a]*i,u=a<l-1?e[a+1]*i:t.length;s-=Math.abs(V(t,h,u,i))}var p=0;for(a=0;a<o.length;a+=3){var y=o[a]*i,c=o[a+1]*i,f=o[a+2]*i;p+=Math.abs((t[y]-t[f])*(t[1+c]-t[1+y])-(t[y]-t[c])*(t[1+f]-t[1+y]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},p.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},o=0,r=0;r<t.length;r++){for(var n=0;n<t[r].length;n++)for(var s=0;s<e;s++)i.vertices.push(t[r][n][s]);0<r&&(o+=t[r-1].length,i.holes.push(o))}return i},O.default=i;var k=(W.prototype.getDrawInfo=function(){return{id:this._id,info:this._geometryInfo,type:this._type,taskId:this._taskId}},W);function W(t){this._geometryInfo=[],this._features=t.features,this._id=t.id,this._offset=t.offset,this._layout=t.layout,this._type=t.type,this._taskId=t.taskId}var F=(q.getId=function(t){return void 0===t&&(t="nag"),t+"-"+(q.id+=1)},q.id=0,q);function q(){}var B={parseColor:function(t){if(!t)return[0,0,0,1];var e=[];if("#"===t.substr(0,1)){for(var i=t.slice(1),o=0;o<5;o+=2){var r=parseInt(i.substr(o,2),16)/255;e.push(r||0)}e.push(1)}else if("rgba"===t.substr(0,4)){var n=(i=t.slice(5,-1)).split(",");for(o=0;o<3;o+=1){r=Number(n[o])/255;e.push(r||0)}e.push(Number(n[3])||1)}else if("rgb"===t.substr(0,3)){for(n=(i=t.slice(4,-1)).split(","),o=0;o<3;o+=1){r=Number(n[o])/255;e.push(r||0)}e.push(1)}return 4!==e.length?[0,0,0,1]:e},getStyle:function(t,e,i){var o=t.keys,r=t.values,n=t[e];if(o&&r&&i)for(var s=0;s<o.length;s+=1){var a=r[i[o[s]]];if(a&&void 0!==a[e])return n=a[e]}return n}},H=(U.prototype.add=function(t,e){if(0===e)this._value=this._value.concat(t);else for(var i=0;i<t.length;i+=1)this._value.push(e+t[i])},U.prototype.clear=function(){this._value=[]},U.prototype.getValue=function(){return this._value},U);function U(t){void 0===t&&(t=[]),this._value=t}var N,D=(t(J,N=k),J.prototype.init=function(){for(var t=0;t<this._features.length;t+=1){var e=this._features[t],i=e.geometry,o=e.properties;if(B.getStyle(this._layout,"visible",o))if("Polygon"===i.type)this._calcPolygon(i.coordinates,o);else if("MultiPolygon"===i.type)for(var r=0;r<i.coordinates.length;r+=1)this._calcPolygon(i.coordinates[r],o)}for(var n in this._geometryMap){var s=this._geometryMap[n];this._geometryInfo.push({vertices:s.vertices,fillIndices:s.fillIndices.getValue(),outlineIndices:s.outlineIndices.getValue(),fillColor:s.fillColor,outlineColor:s.outlineColor,base:s.base,opacity:s.opacity})}},J.prototype._calcPolygon=function(t,e){if(0!==t.length){for(var i=this._offset,o=[],r=[],n=[],s=B.getStyle(this._layout,"enableOutline",e),a=0;a<t.length;a+=1){for(var l=t[a],h=0;h<l.length;h+=1){if(s){var u=o.length/2;h<l.length-1&&n.push(u,1+u)}o.push(l[h][0]+i[0],l[h][1]+i[1])}a<t.length-1&&r.push(o.length/2)}var p=O(o,0===r.length?void 0:r,2),y=B.parseColor(B.getStyle(this._layout,"fillColor",e)),c=B.parseColor(B.getStyle(this._layout,"outlineColor",e)),f=B.getStyle(this._layout,"base",e),v=B.getStyle(this._layout,"opacity",e),g=this._getGeometryKey(e);if(this._geometryMap[g]&&this._geometryMap[g].vertices.length/2+o.length/2<65536){var x=this._geometryMap[g],_=x.vertices.length/2;x.fillIndices.add(p,_),x.outlineIndices.add(n,_),x.vertices=x.vertices.concat(o)}else this._geometryMap[g]&&(this._geometryMap[F.getId()]=this._geometryMap[g]),this._geometryMap[g]={vertices:o,outlineColor:c,fillColor:y,fillIndices:new H(p),outlineIndices:new H(n),base:f,opacity:v}}},J.prototype._getGeometryKey=function(t){for(var e=[],i=0;i<J.GEOMETRY_KEYS.length;i+=1){var o=B.getStyle(this._layout,J.GEOMETRY_KEYS[i],t);void 0!==o&&e.push(o)}return e.join("-")},J.GEOMETRY_KEYS=["fillColor","outlineColor","base","opacity"],J);function J(){var t=null!==N&&N.apply(this,arguments)||this;return t._geometryMap={},t}var X=(Q.prototype.unit=function(){var t=this.getLength();return 0===t?new Q([0,0]):new Q([0,0],[this.x/t,this.y/t])},Q.prototype.normal=function(){return new Q([0,0],[-this.y,this.x])},Q.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},Q.prototype.subtract=function(t){return this.x-=t.x,this.y-=t.y,this},Q.prototype.rotate=function(t){var e=Math.cos(t),i=Math.sin(t),o=e*this.x-i*this.y,r=i*this.x+e*this.y;return this.x=o,this.y=r,this},Q.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Q.prototype.dot=function(t){return this.x*t.x+this.y*t.y},Q.prototype.angleTo=function(t){var e=this.getLength()*t.getLength();if(0==e)return 0;var i=(this.x*t.x+this.y*t.y)/e;1<i?i=1:i<-1&&(i=-1);var o=Math.acos(i)/Math.PI*180;return(this.cross(t)<0?1:-1)*o},Q.prototype.cross=function(t){return this.x*t.y-t.x*this.y},Q.prototype.clone=function(){return new Q([0,0],[this.x,this.y])},Q.prototype.multiplyMat4=function(t){var e=t.getValue();return new Q([e[0]*this.x+e[4]*this.y+e[12],e[1]*this.x+e[5]*this.y+e[13]])},Q.prototype.getLength=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},Q);function Q(t,e){e?(this.x=e[0]-t[0],this.y=e[1]-t[1]):(this.x=t[0],this.y=t[1])}var $,tt=(t(et,$=k),et.prototype.init=function(){for(var t=0;t<this._features.length;t+=1)this._update(this._features[t]);this._fireMessage()},et.prototype._fireMessage=function(){for(var t in this._geometryInfo.length=0,this._geometryMap){var e=this._geometryMap[t];this._geometryInfo.push({vertices:e.vertices,fillIndices:e.fillIndices.getValue(),outlineIndices:e.outlineIndices.getValue(),fillColor:e.fillColor,outlineColor:e.outlineColor,base:e.base,opacity:e.opacity,normals:e.normals,height:e.height,zoomRange:e.zoomRange})}},et.prototype._update=function(t){var e=t.geometry,i=t.properties;if(B.getStyle(this._layout,"visible",i))if("Polygon"===e.type)this._calcPolygon(e.coordinates,i);else if("MultiPolygon"===e.type)for(var o=0;o<e.coordinates.length;o+=1)this._calcPolygon(e.coordinates[o],i)},et.prototype._calcPolygon=function(t,e){for(var i=this._offset,o=[],r=[],n=[],s=[],a=[],l=[],h=[],u=B.getStyle(this._layout,"enableOutline",e),p=B.getStyle(this._layout,"height",e),y=0;y<t.length;y+=1){for(var c=t[y],f=0;f<c.length;f+=1){var v=c[f][0]+i[0],g=c[f][1]+i[1],x=r.length/2;if(f<c.length-1){if(u){var _=o.length/2;a.push(_,1+_)}var d=new X(c[f],c[f+1]).normal();l.push(d.x,d.y,0),l.push(d.x,d.y,1),l.push(d.x,d.y,0),l.push(d.x,d.y,1),n.push(0+x,1+x,2+x),n.push(1+x,2+x,3+x),r.push(v,g),r.push(v,g);var m=c[f+1][0]+i[0],w=c[f+1][1]+i[1];r.push(m,w),r.push(m,w)}h.push(0,0,et.FACTOR+1),o.push(v,g)}y<t.length-1&&s.push(o.length/2)}var M=O(o,0===s.length?void 0:s,2),S=o.length/2;for(y=0;y<n.length;y+=1)M.push(n[y]+S);var b=S+r.length/2,z=B.parseColor(B.getStyle(this._layout,"fillColor",e)),P=B.parseColor(B.getStyle(this._layout,"outlineColor",e)),I=B.getStyle(this._layout,"base",e),C=B.getStyle(this._layout,"opacity",e),E=B.getStyle(this._layout,"zoomRange",e),T=this._getGeometryKey(e);if(this._geometryMap[T]&&this._geometryMap[T].vertices.length/2+b<65536){var R=this._geometryMap[T],Z=R.vertices.length/2;R.fillIndices.add(M,Z),R.outlineIndices.add(a,Z),R.vertices=R.vertices.concat(o).concat(r),R.normals=R.normals.concat(h).concat(l)}else this._geometryMap[T]&&(this._geometryMap[F.getId()]=this._geometryMap[T]),this._geometryMap[T]={vertices:o.concat(r),normals:h.concat(l),fillIndices:new H(M),outlineIndices:new H(a),fillColor:z,outlineColor:P,height:p,base:I,opacity:C,zoomRange:E}},et.prototype._getGeometryKey=function(t){for(var e=[],i=0;i<et.GEOMETRY_KEYS.length;i+=1){var o=B.getStyle(this._layout,et.GEOMETRY_KEYS[i],t);void 0!==o&&e.push(o)}return e.join("-")},et.GEOMETRY_KEYS=["fillColor","outlineColor","height","base","opacity","zoomRange"],et.FACTOR=Math.pow(2,13),et);function et(){var t=null!==$&&$.apply(this,arguments)||this;return t._geometryMap={},t}var it,ot=(t(rt,it=k),rt.prototype.init=function(){for(var t=0;t<this._features.length;t+=1){var e=this._features[t],i=e.geometry,o=e.properties;if(B.getStyle(this._layout,"visible",o))if("Point"===i.type)this._calcPoint(i.coordinates,o);else if("MultiPoint"===i.type)for(var r=0;r<i.coordinates.length;r+=1)this._calcPoint(i.coordinates[r],o)}},rt.prototype._calcPoint=function(t,e){var i=this._offset,o=[t[0]+i[0],t[1]+i[1]],r=B.parseColor(B.getStyle(this._layout,"color",e)),n=B.getStyle(this._layout,"base",e),s=B.getStyle(this._layout,"radius",e),a=B.getStyle(this._layout,"opacity",e);this._geometryInfo.push({color:r,base:n,point:o,radius:s,opacity:a})},rt);function rt(){return null!==it&&it.apply(this,arguments)||this}var nt,st=(t(at,nt=k),at.prototype.init=function(){for(var t=0;t<this._features.length;t+=1){var e=this._features[t],i=e.geometry,o=e.properties;if(B.getStyle(this._layout,"visible",o))if("Point"===i.type)this._calcPoint(i.coordinates,this._features[t]);else if("MultiPoint"===i.type)for(var r=0;r<i.coordinates.length;r+=1)this._calcPoint(i.coordinates[r],this._features[t])}},at.prototype._calcPoint=function(t,e){var i=this._offset,o=[t[0]+i[0],t[1]+i[1]],r=B.getStyle(this._layout,"opacity",e.properties),n=B.getStyle(this._layout,"base",e.properties),s=B.getStyle(this._layout,"iconZHeight",e.properties),a=B.getStyle(this._layout,"textZHeight",e.properties);s&&a?n+=(s+a)/2:s?n+=s:a&&(n+=a);var l=this._calcImage(o,e,n,r),h=this._calcText(o,e,n,r),u=B.getStyle(this._layout,"collision",e.properties),p={point:o,data:[],weight:B.getStyle(this._layout,"weight",e.properties),margin:B.getStyle(this._layout,"margin",e.properties),zoomRange:B.getStyle(this._layout,"zoomRange",e.properties)},y=[];l&&h?(p.data.push(l.collision,h.collision),y.push(l.geometry,h.geometry)):l?(p.data.push(l.collision),y.push(l.geometry)):h&&(p.data.push(h.collision),y.push(h.geometry)),this._geometryInfo.push({data:y,isCollision:u,collision:p})},at.prototype._calcImage=function(t,e,i,o){if(e.iconSize){var r=B.getStyle(this._layout,"iconImage",e.properties),n=B.getStyle(this._layout,"iconAnchor",e.properties),s=B.getStyle(this._layout,"iconOffset",e.properties),a=B.getStyle(this._layout,"iconSize",e.properties),l=e.iconSize[0]*a,h=e.iconSize[1]*a,u=c(t,l,h,n);return{geometry:{point:t,vertices:u.vertices,texCoords:u.texCoords,offset:s,base:i,opacity:o,iconUrl:r},collision:{width:l,height:h,anchor:n,offset:s}}}},at.prototype._calcText=function(t,e,i,o){if(e.textSize&&e.textArr){var r=B.getStyle(this._layout,"textSize",e.properties),n=B.getStyle(this._layout,"textAnchor",e.properties),s=B.getStyle(this._layout,"textOffset",e.properties),a=e.textSize[0]*r/this._baseTextSize,l=e.textSize[1]*r/this._baseTextSize,h=B.getStyle(this._layout,"textColor",e.properties),u=B.getStyle(this._layout,"textStrokeColor",e.properties),p=c(t,a,l,n);return{geometry:{point:t,vertices:p.vertices,texCoords:p.texCoords,offset:s,base:i,opacity:o,textOptions:{textArr:e.textArr,width:e.textSize[0],height:e.textSize[1],fillColor:h,strokeColor:u}},collision:{width:a,height:l,anchor:n,offset:s}}}},at);function at(t){var e=nt.call(this,t)||this;return e._baseTextSize=t.baseTextSize,e}var lt,ht=(t(ut,lt=k),ut.prototype.init=function(){for(var t=0;t<this._features.length;t+=1){var e=this._features[t],i=e.geometry,o=e.properties;if(B.getStyle(this._layout,"visible",o))if("LineString"===i.type)this._calcPolyline(i.coordinates,o);else if("MultiLineString"===i.type)for(var r=0;r<i.coordinates.length;r+=1)this._calcPolyline(i.coordinates[r],o)}},ut.prototype._calcPolyline=function(t,e){for(var i=this._offset,o=B.getStyle(this._layout,"base",e),r=B.getStyle(this._layout,"opacity",e),n=B.parseColor(B.getStyle(this._layout,"color",e)),s=B.getStyle(this._layout,"width",e),a=B.getStyle(this._layout,"icon",e),l=[],h=[],u=[],p=0;p<t.length;p+=1){var y=[t[p][0]+i[0],t[p][1]+i[1],t[p][2]];if(0===p){var c=[t[p][0]+i[0],t[p][2]],f=[t[p+1][0]+i[0],t[p+1][2]],v=new X(c,f).normal().unit();h.push(v.x,v.y,-v.x,-v.y),l.push.apply(l,A(y,y)),u.push(0,1,0,0)}else if(p<t.length-1){var g=[t[p-1][0]+i[0],t[p-1][2]],x=[t[p][0]+i[0],t[p][2]],_=[t[p+1][0]+i[0],t[p+1][2]],d=new X(g,x),m=d.normal().unit();h.push(m.x,m.y,-m.x,-m.y),l.push.apply(l,A(y,y)),u.push(1*d.getLength(),1,1*d.getLength(),0);var w=new X(x,_).normal().unit();h.push(w.x,w.y,-w.x,-w.y),l.push.apply(l,A(y,y)),u.push(0,1,0,0)}else{c=[t[p-1][0]+i[0],t[p-1][2]],f=[t[p][0]+i[0],t[p][2]];var M=new X(c,f);v=M.normal().unit(),h.push(v.x,v.y,-v.x,-v.y),l.push.apply(l,A(y,y)),u.push(1*M.getLength(),1,1*M.getLength(),0)}}this._geometryInfo.push({vertices:l,normals:h,base:o,opacity:r,width:s,color:n,iconUrl:a,texCoords:u})},ut);function ut(){return null!==lt&&lt.apply(this,arguments)||this}var pt,yt=(t(ct,pt=k),ct.prototype.init=function(){for(var t=0;t<this._features.length;t+=1){var e=this._features[t],i=e.geometry,o=e.properties;if(B.getStyle(this._layout,"visible",o))if("Point"===i.type)this._calcPoint(i.coordinates,o);else if("MultiPoint"===i.type)for(var r=0;r<i.coordinates.length;r+=1)this._calcPoint(i.coordinates[r],o)}},ct.prototype._calcPoint=function(t,e){var i=this._offset,o=[t[0]+i[0],t[1]+i[1]],r=B.getStyle(this._layout,"radius",e);this._geometryInfo.push({point:o,radius:r})},ct);function ct(){return null!==pt&&pt.apply(this,arguments)||this}var ft,vt=(t(gt,ft=k),gt.prototype.init=function(){for(var t=0;t<this._features.length;t+=1){var e=this._features[t],i=e.properties,o=e.geometry;if(B.getStyle(this._layout,"visible",i))if("LineString"===o.type)this._calcPolyline(o.coordinates,i);else if("MultiLineString"===o.type)for(var r=0;r<o.coordinates.length;r+=1)this._calcPolyline(o.coordinates[r],i)}for(var n in this._geometryMap)this._geometryInfo.push(u(u({},this._geometryMap[n]),{indices:this._geometryMap[n].indices.getValue()}))},gt.prototype._calcPolyline=function(t,e){for(var i=this._offset,o=B.getStyle(this._layout,"base",e),r=B.getStyle(this._layout,"opacity",e),n=B.getStyle(this._layout,"lineWidth",e),s=B.parseColor(B.getStyle(this._layout,"lineColor",e)),a=B.getStyle(this._layout,"lineImage",e),l=[],h=[],u=[],p=[],y=[],c=0;c<t.length;c+=1){var f=[t[c][0]+i[0],t[c][1]+i[1]],v=l.length/2;if(0===c){var g=(K=new X(t[c],t[c+1])).normal().unit();l.push.apply(l,A(f,f)),p.push(0,1,0,0),u.push(0,0,0,0,0,0),h.push(g.x,g.y,-g.x,-g.y),y.push(v+0,v+1)}else if(c<t.length-1){var x=[t[c-1][0]+i[0],t[c-1][1]+i[1]],_=[t[c+1][0]+i[0],t[c+1][1]+i[1]],d=new X(x,f),m=d.getLength(),w=d.unit(),M=w.normal(),S=new X(f,_),b=S.getLength(),z=S.unit(),P=z.normal(),I=Math.abs(M.angleTo(P));I=(I=180===I?0:I)/180*Math.PI;var C=Math.tan(I/2);w.multiply(-C),z.multiply(C),l.push.apply(l,A(f,f)),p.push(1*m,1,1*m,0),u.push(w.x,w.y,m,w.x,w.y,m),y.push(v,v-1,v,v+1),h.push(M.x,M.y,-M.x,-M.y);var E=M.cross(P)<=0?-1:1;l.push.apply(l,A(f,f)),p.push(0,-1==E?1:0,0,-1==E?0:.93),u.push(w.x,w.y,m,w.x,w.y,m),h.push(M.x,M.y,-M.x,-M.y),v+=2;var T=gt.getLineJoin(f,M,P,l.length/2),R=T.indices,Z=T.vertices,O=T.normals,Y=T.texCoords,L=T.deviation;l.push.apply(l,Z),y.push.apply(y,R),h.push.apply(h,O),u.push.apply(u,L),p.push.apply(p,Y),l.push.apply(l,A(f,f)),p.push(0,-1==E?1:0,0,-1==E?0:.93),u.push(z.x,z.y,b,z.x,z.y,b),h.push(P.x,P.y,-P.x,-P.y),v+=2;var G=Z.length/2;l.push.apply(l,A(f,f)),p.push(0,1,0,0),u.push(z.x,z.y,b,z.x,z.y,b),y.push(v+2+G,v+3+G),h.push(P.x,P.y,-P.x,-P.y)}else{x=[t[c-1][0]+i[0],t[c-1][1]+i[1]];var K,j=(K=new X(x,f)).getLength();g=K.normal().unit(),l.push.apply(l,A(f,f)),u.push(0,0,0,0,0,0),p.push(1*j,1,1*j,0),y.push(v,v-1,v,v+1),h.push(g.x,g.y,-g.x,-g.y)}}var V=this._getGeometryKey(e);if(this._geometryMap[V]&&this._geometryMap[V].vertices.length/2+l.length/2<65536){var k=this._geometryMap[V],W=k.vertices.length/2;k.indices.add(y,W),k.vertices=k.vertices.concat(l),k.texCoords=k.texCoords.concat(p),k.normals=k.normals.concat(h),k.deviation=k.deviation.concat(u)}else this._geometryMap[V]={vertices:l,normals:h,base:o,opacity:r,width:n,color:s,deviation:u,iconUrl:a,texCoords:p,indices:new H(y)}},gt.prototype._getGeometryKey=function(t){for(var e=[],i=0;i<gt.GEOMETRY_KEYS.length;i+=1){var o=B.getStyle(this._layout,gt.GEOMETRY_KEYS[i],t);void 0!==o&&e.push(o)}return e.join("-")},gt.getLineJoin=function(t,e,i,o){var r=[],n=[],s=[],a=[],l=[],h=Math.PI/16,u=Math.abs(e.angleTo(i))/180*Math.PI+h,p=e.clone().add(i).unit(),y=p.normal(),c=e.unit().normal(),f=1/y.dot(c),v=e.cross(i)<=0?-1:1;p.multiply(f*v),r.push.apply(r,t),n.push(0,.7),s.push(0,0,0),a.push(0,0),h<u&&l.push(o-1,o,o+1,o-2,o-1,-1==v?o+1:o);for(var g=e.clone().multiply(-1*v),x=o,_=0;_<u;_+=h){var d=g.clone().rotate(_*v);r.push.apply(r,t),n.push(0,.93),s.push(0,0,0),a.push(d.x,d.y),_+h<u?(l.push(o+0),l.push(x+1),l.push(x+2)):l.push(o,x+1,x+3,-1==v?x+1:o,x+2,x+3),x+=1}return{vertices:r,indices:l,normals:a,texCoords:n,deviation:s}},gt.GEOMETRY_KEYS=["lineColor","lineWidth","base","opacity","lineImage"],gt);function gt(){var t=null!==ft&&ft.apply(this,arguments)||this;return t._geometryMap={},t}var xt,_t=(t(dt,xt=k),dt.prototype.init=function(){for(var t=0;t<this._features.length;t+=1){var e=this._features[t],i=e.geometry,o=e.properties;if(B.getStyle(this._layout,"visible",o))if("Point"===i.type)this._calcPoint(i.coordinates,o);else if("MultiPoint"===i.type)for(var r=0;r<i.coordinates.length;r+=1)this._calcPoint(i.coordinates[r],o)}},dt.prototype._calcPoint=function(t,e){var i=B.getStyle(this._layout,"url",e);if(i){var o=this._offset;if(B.getStyle(this._layout,"visible",e)){var r=new y,n=[t[0]+o[0],t[1]+o[1]],s=B.getStyle(this._layout,"base",e),a=B.getStyle(this._layout,"size",e),l=B.getStyle(this._layout,"rotateX",e),h=B.getStyle(this._layout,"rotateY",e),u=B.getStyle(this._layout,"rotateZ",e),p=B.getStyle(this._layout,"opacity",e);r.scale(a,a,a),r.rotate(l,1,0,0),r.rotate(h,0,1,0),r.rotate(u,0,0,1),this._geometryInfo.push({matrix:r.getValue(),opacity:p,point:n,base:s,url:i})}}},dt);function dt(){return null!==xt&&xt.apply(this,arguments)||this}var mt,wt=(t(Mt,mt=k),Mt.prototype.init=function(){for(var t=0;t<this._features.length;t+=1){var e=this._features[t],i=e.geometry,o=e.properties;if(B.getStyle(this._layout,"visible",o))if("LineString"===i.type)this._calcPolyline(i.coordinates,o);else if("MultiLineString"===i.type)for(var r=0;r<i.coordinates.length;r+=1)this._calcPolyline(i.coordinates[r],o)}for(var n in this._geometryMap)this._geometryInfo.push(u(u({},this._geometryMap[n]),{indices:this._geometryMap[n].indices.getValue()}))},Mt.prototype._calcPolyline=function(t,e){if(!(t.length<2)){for(var i=[],o=this._offset,r=[],n=0;n<t.length;n+=1){var s=t[n],a=s[0],l=s[1];i.push(a+o[0],l+o[1]),n+1<t.length&&r.push(n,n+1)}var h=B.parseColor(B.getStyle(this._layout,"color",e)),u=B.getStyle(this._layout,"base",e),p=B.getStyle(this._layout,"opacity",e),y=this._getGeometryKey(e);if(this._geometryMap[y]&&this._geometryMap[y].vertices.length/2+i.length/2<65536){var c=this._geometryMap[y],f=c.vertices.length/2;c.indices.add(r,f),c.vertices=c.vertices.concat(i)}else this._geometryMap[y]&&(this._geometryMap[F.getId()]=this._geometryMap[y]),this._geometryMap[y]={vertices:i,color:h,base:u,indices:new H(r),opacity:p}}},Mt.prototype._getGeometryKey=function(t){for(var e=[],i=0;i<Mt.GEOMETRY_KEYS.length;i+=1){var o=B.getStyle(this._layout,Mt.GEOMETRY_KEYS[i],t);void 0!==o&&e.push(o)}return e.join("-")},Mt.GEOMETRY_KEYS=["color","base","opacity"],Mt);function Mt(){var t=null!==mt&&mt.apply(this,arguments)||this;return t._geometryMap={},t}var St,bt=(t(zt,St=k),zt.prototype.init=function(){for(var t=0;t<this._features.length;t+=1){var e=this._features[t],i=e.geometry,o=e.properties;if(B.getStyle(this._layout,"visible",o))if("Point"===i.type)this._calcPoint(i.coordinates,this._features[t]);else if("MultiPoint"===i.type)for(var r=0;r<i.coordinates.length;r+=1)this._calcPoint(i.coordinates[r],this._features[t])}},zt.prototype._calcPoint=function(t,e){var i=this._offset,o=B.getStyle(this._layout,"iconImage",e.properties);if(o){var r=[t[0]+i[0],t[1]+i[1]],n=B.getStyle(this._layout,"base",e.properties),s=B.getStyle(this._layout,"size",e.properties),a=B.getStyle(this._layout,"rotate",e.properties),l=B.getStyle(this._layout,"opacity",e.properties),h=c(r,e.imgSize[0]*s,e.imgSize[1]*s,"center");this._geometryInfo.push({opacity:l,base:n,rotate:a,point:r,vertices:h.vertices,iconUrl:o,texCoords:h.texCoords,index:e.index})}},zt);function zt(){return null!==St&&St.apply(this,arguments)||this}function Pt(){}var It=new(Pt.prototype.calculate=function(t){var e;if("fill"===t.type?e=new D(t):"fillExtrusion"===t.type?e=new tt(t):"circle"===t.type?e=new ot(t):"symbol"===t.type?e=new st(t):"connection"===t.type?e=new ht(t):"heatmap"===t.type?e=new yt(t):"line"===t.type?e=new vt(t):"model"===t.type?e=new _t(t):"track"===t.type?e=new wt(t):"picture"===t.type&&(e=new bt(t)),e)return e.init(),e.getDrawInfo()},Pt);onmessage=function(t){var e=t.data;"collision"===e.type?function(t){r?r.updateOptions({view:t.view,viewMatrix:t.viewMatrix,projectionMatrix:t.projectionMatrix,zoom:t.zoom,z:t.z,center:t.center,onePixelToWorld:t.onePixelToWorld}):r=new a({view:t.view,viewMatrix:t.viewMatrix,projectionMatrix:t.projectionMatrix,zoom:t.zoom,z:t.z,center:t.center,onePixelToWorld:t.onePixelToWorld});var e=r.calculate(t.list),i=u(u({type:"collisionResult"},e),{isForce:t.isForce});postMessage(i)}(e):function(t){var e=It.calculate(t);e&&postMessage(e)}(e)}}();\n'
		),
		W = (e(Z, D = i), Z.prototype.getStep = function() {
			return this._step
		}, Z.prototype._frameUpdate = function() {
			if (0 !== this._updateQueue.length) {
				var t = this._updateQueue.shift();
				this._update(t)
			} else this._stopFrameUpdate()
		}, Z.prototype._startFrameUpdate = function() {
			if (!this._updateTimer) {
				this._frameUpdate();
				var t = Math.max(this._options.collisionDuration, this._options.animateDuration);
				this._updateTimer = window.setInterval(this._frameUpdate, t)
			}
		}, Z.prototype._stopFrameUpdate = function() {
			this._updateTimer && (clearInterval(this._updateTimer), delete this._updateTimer)
		}, Z.prototype._onMessage = function(t) {
			var e = t.data;
			"collisionResult" === e.type && this.fire("change", e)
		}, Z.prototype.add = function(t) {
			this._collisionList.push(t)
		}, Z.prototype.remove = function(e) {
			var t = this._collisionList.findIndex(function(t) {
				return t.id === e.id
			}); - 1 !== t && this._collisionList.splice(t, 1)
		}, Z.prototype.clear = function() {
			this._collisionList.length = 0
		}, Z.prototype.update = function(t) {
			if (t) return this._updateQueue.length = 0, void this._update(!0);
			0 === this._updateQueue.length && this._updateQueue.push(!1), this._startFrameUpdate()
		}, Z.prototype._update = function(t) {
			var e = this._options,
				i = e.viewHeight,
				o = e.viewWidth,
				r = this._camera.getCenter(),
				n = this._camera.getOffset(),
				s = {
					type: "collision",
					isForce: t,
					zoom: this._camera.getZoom(),
					z: this._camera.getZ(),
					center: {
						x: r.x + n[0],
						y: r.y + n[1]
					},
					onePixelToWorld: this._camera.getOnePixelToWorld(),
					view: {
						viewWidth: o,
						viewHeight: i
					},
					viewMatrix: this._camera.viewMatrix,
					projectionMatrix: this._camera.projectionMatrix,
					list: this._collisionList
				};
			this._worker.postMessage(s)
		}, Z.prototype.destroy = function() {
			this._worker.terminate(), this.clear(), this.clearListeners()
		}, Z.prototype.resize = function(t, e) {
			this._options.viewWidth = t, this._options.viewHeight = e
		}, Z);

	function Z(t, e) {
		var i = D.call(this) || this;
		return i._collisionList = [], i._worker = new U, i._updateQueue = [], i._camera = t, u(["_onMessage", "_frameUpdate"],
				i), i._options = e, i._step = 1 / Math.floor(e.animateDuration / 16), i._worker.addEventListener("message", i._onMessage),
			i
	}
	var j = (Y.prototype._setupCanvasWidth = function(t) {
		this._canvas.width = t * this._pixelRatio, this._canvas.style.width = t + "px"
	}, Y.prototype._setupCanvasHeight = function(t) {
		this._canvas.height = t * this._pixelRatio, this._canvas.style.height = t + "px"
	}, Y.prototype.getWidth = function() {
		return this._width
	}, Y.prototype.getHeight = function() {
		return this._height
	}, Y);

	function Y() {
		this._width = 1080, this._height = 960, this._pixelRatio = devicePixelRatio, this._canvas = document.createElement(
			"canvas"), this._setupCanvasWidth(this._width), this._setupCanvasHeight(this._height), this._ctx = this._canvas.getContext(
			"2d")
	}
	var H, q = (e(X, H = j), X.prototype.getTexture = function(t, e) {
		var i = t + "-" + e.xRepeat + "-" + e.yRepeat;
		return this._textureMap.get(i)
	}, X.prototype.getEmptyTexture = function() {
		return this._emptyTexture
	}, X.prototype.loadTexture = function(t, e) {
		var i = this,
			o = t + "-" + e.xRepeat + "-" + e.yRepeat,
			r = this._hasRequestTextureMap.get(o);
		return r || (r = this._loadTexture(t, e), this._hasRequestTextureMap.set(o, r), r.then(function() {
			i._hasRequestTextureMap.delete(o)
		})), r
	}, X.prototype._loadTexture = function(a, h) {
		return v(this, void 0, void 0, function() {
			var e, i, o, r, n, s;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return e = a + "-" + h.xRepeat + "-" + h.yRepeat, [4, this._loadImage(a, h)];
					case 1:
						return i = t.sent(), o = this._initTexture(i, h), r = i.width, n = i.height, s = {
							texture: o,
							width: r,
							height: n
						}, this._textureMap.set(e, s), [2, s]
				}
			})
		})
	}, X.prototype._initTexture = function(t, e) {
		var i = this._gl.createTexture();
		this._gl.bindTexture(this._gl.TEXTURE_2D, i), this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER,
			this._gl.LINEAR), this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, this._gl.LINEAR);
		var o = e.xRepeat ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;
		this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_S, o);
		var r = e.yRepeat ? this._gl.REPEAT : this._gl.CLAMP_TO_EDGE;
		return this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_T, r), this._gl.texImage2D(this._gl.TEXTURE_2D,
			0, this._gl.RGBA, this._gl.RGBA, this._gl.UNSIGNED_BYTE, t), i
	}, X.prototype._loadImage = function(i, s) {
		var t = this;
		return new Promise(function(n, e) {
			return v(t, void 0, void 0, function() {
				var o, r = this;
				return x(this, function(t) {
					return (o = new Image).crossOrigin = "anonymous", o.src = i, o.onload = function() {
						var t = o.width,
							e = o.height;
						s.xRepeat && (t = Math.pow(2, Math.ceil(Math.log2(o.width)))), s.yRepeat && (e = Math.pow(2, Math.ceil(
							Math.log2(o.height)))), r._ctx.clearRect(0, 0, t, e), r._ctx.drawImage(o, 0, 0, t, e);
						var i = r._ctx.getImageData(0, 0, t, e);
						n(i)
					}, o.onerror = function(t) {
						e(t)
					}, [2]
				})
			})
		})
	}, X.prototype.destroy = function() {
		this._textureMap.clear()
	}, X);

	function X(t) {
		var e = H.call(this) || this;
		e._textureMap = new Map, e._hasRequestTextureMap = new Map, e._gl = t, e._emptyTexture = e._gl.createTexture(), e._gl
			.bindTexture(e._gl.TEXTURE_2D, e._emptyTexture), e._gl.texParameteri(e._gl.TEXTURE_2D, e._gl.TEXTURE_MAG_FILTER, e._gl
				.LINEAR), e._gl.texParameteri(e._gl.TEXTURE_2D, e._gl.TEXTURE_MIN_FILTER, e._gl.LINEAR), e._gl.texParameteri(e._gl
				.TEXTURE_2D, e._gl.TEXTURE_WRAP_S, e._gl.CLAMP_TO_EDGE), e._gl.texParameteri(e._gl.TEXTURE_2D, e._gl.TEXTURE_WRAP_T,
				e._gl.CLAMP_TO_EDGE);
		var i = document.createElement("canvas");
		return e._gl.texImage2D(e._gl.TEXTURE_2D, 0, e._gl.RGBA, e._gl.RGBA, e._gl.UNSIGNED_BYTE, i), e
	}
	var K, Q = (e(J, K = j), J.prototype.getBaseSize = function() {
		return this._baseSize
	}, J.prototype.getPixels = function(t) {
		var e = this._options.buffer,
			i = t.fillColor,
			o = t.strokeColor,
			r = t.textArr,
			n = t.width,
			s = t.height,
			a = n * this._pixelRatio,
			h = s * this._pixelRatio;
		this._ctx.clearRect(0, 0, a, h);
		for (var l = 0; l < r.length; l += 1) {
			var u = (this._baseSize / 2 + l * this._baseSize + (l + 1) * e) * this._pixelRatio;
			o && (this._ctx.strokeStyle = o, this._ctx.strokeText(r[l], e, u)), i && (this._ctx.fillStyle = i, this._ctx.fillText(
				r[l], e, u))
		}
		return this._ctx.getImageData(0, 0, a, h)
	}, J.prototype.getTexture = function(t) {
		var e = this.getPixels(t),
			i = this._gl.createTexture();
		return this._gl.bindTexture(this._gl.TEXTURE_2D, i), this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MIN_FILTER,
				this._gl.LINEAR), this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, this._gl.LINEAR),
			this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_S, this._gl.CLAMP_TO_EDGE), this._gl.texParameteri(
				this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_T, this._gl.CLAMP_TO_EDGE), this._gl.texImage2D(this._gl.TEXTURE_2D,
				0, this._gl.RGBA, this._gl.RGBA, this._gl.UNSIGNED_BYTE, e), this._gl.bindTexture(this._gl.TEXTURE_2D, null), i
	}, J.prototype.getTextBound = function(t) {
		var e = this._options,
			i = e.buffer,
			o = e.textMaxWidth,
			r = e.textSplit,
			n = [];
		if (r && -1 !== t.indexOf(r)) n = t.split(r);
		else
			for (var s = Math.ceil(t.length / o), a = Math.ceil(t.length / s), h = 0; h < s; h += 1) n.push(t.slice(h * a, (h +
				1) * a));
		var l = this._ctx.measureText(n[0]).width;
		for (h = 1; h < n.length; h += 1) {
			var u = this._ctx.measureText(n[h]).width;
			l < u && (l = u)
		}
		return {
			width: Math.round(l + 2 * i) / this._pixelRatio,
			height: Math.round(this._baseSize * n.length + i * (n.length + 1)),
			textArr: n
		}
	}, J);

	function J(t, e) {
		var i = K.call(this) || this;
		i._baseSize = 14, i._gl = t, i._options = e, i._ctx.textAlign = "left", i._ctx.textBaseline = "middle", i._ctx.lineWidth =
			3;
		var o = i._baseSize * i._pixelRatio;
		return i._ctx.font = i._options.fontWeight + " " + o + "px " + i._options.fontFamily, i
	}
	var $ = et,
		tt = et;

	function et(t, e, i) {
		i = i || 2;
		var o, r, n, s, a, h, l, u = e && e.length,
			_ = u ? e[0] * i : t.length,
			p = it(t, 0, _, i, !0),
			c = [];
		if (!p || p.next === p.prev) return c;
		if (u && (p = function(t, e, i, o) {
				var r, n, s, a, h, l = [];
				for (r = 0, n = e.length; r < n; r++) s = e[r] * o, a = r < n - 1 ? e[r + 1] * o : t.length, (h = it(t, s, a, o,
					!1)) === h.next && (h.steiner = !0), l.push(pt(h));
				for (l.sort(lt), r = 0; r < l.length; r++) ut(l[r], i), i = ot(i, i.next);
				return i
			}(t, e, p, i)), t.length > 80 * i) {
			o = n = t[0], r = s = t[1];
			for (var f = i; f < _; f += i)(a = t[f]) < o && (o = a), (h = t[f + 1]) < r && (r = h), n < a && (n = a), s < h &&
				(s = h);
			l = 0 !== (l = Math.max(n - o, s - r)) ? 1 / l : 0
		}
		return rt(p, c, i, o, r, l), c
	}

	function it(t, e, i, o, r) {
		var n, s;
		if (r === 0 < bt(t, e, i, o))
			for (n = e; n < i; n += o) s = wt(n, t[n], t[n + 1], s);
		else
			for (n = i - o; e <= n; n -= o) s = wt(n, t[n], t[n + 1], s);
		return s && gt(s, s.next) && (Mt(s), s = s.next), s
	}

	function ot(t, e) {
		if (!t) return t;
		e = e || t;
		var i, o = t;
		do {
			if (i = !1, o.steiner || !gt(o, o.next) && 0 !== ft(o.prev, o, o.next)) o = o.next;
			else {
				if (Mt(o), (o = e = o.prev) === o.next) break;
				i = !0
			}
		} while (i || o !== e);
		return e
	}

	function rt(t, e, i, o, r, n, s) {
		if (t) {
			!s && n && function(t, e, i, o) {
				var r = t;
				for (; null === r.z && (r.z = _t(r.x, r.y, e, i, o)), r.prevZ = r.prev, r.nextZ = r.next, r = r.next, r !== t;);
				r.prevZ.nextZ = null, r.prevZ = null,
					function(t) {
						var e, i, o, r, n, s, a, h, l = 1;
						do {
							for (i = t, n = t = null, s = 0; i;) {
								for (s++, o = i, e = a = 0; e < l && (a++, o = o.nextZ); e++);
								for (h = l; 0 < a || 0 < h && o;) 0 !== a && (0 === h || !o || i.z <= o.z) ? (i = (r = i).nextZ, a--) : (o =
									(r = o).nextZ, h--), n ? n.nextZ = r : t = r, r.prevZ = n, n = r;
								i = o
							}
							n.nextZ = null, l *= 2
						} while (1 < s)
					}(r)
			}(t, o, r, n);
			for (var a, h, l = t; t.prev !== t.next;)
				if (a = t.prev, h = t.next, n ? st(t, o, r, n) : nt(t)) e.push(a.i / i), e.push(t.i / i), e.push(h.i / i), Mt(t),
					t = h.next, l = h.next;
				else if ((t = h) === l) {
				s ? 1 === s ? rt(t = at(ot(t), e, i), e, i, o, r, n, 2) : 2 === s && ht(t, e, i, o, r, n) : rt(ot(t), e, i, o, r,
					n, 1);
				break
			}
		}
	}

	function nt(t) {
		var e = t.prev,
			i = t,
			o = t.next;
		if (0 <= ft(e, i, o)) return !1;
		for (var r = t.next.next; r !== t.prev;) {
			if (ct(e.x, e.y, i.x, i.y, o.x, o.y, r.x, r.y) && 0 <= ft(r.prev, r, r.next)) return !1;
			r = r.next
		}
		return !0
	}

	function st(t, e, i, o) {
		var r = t.prev,
			n = t,
			s = t.next;
		if (0 <= ft(r, n, s)) return !1;
		for (var a = r.x < n.x ? r.x < s.x ? r.x : s.x : n.x < s.x ? n.x : s.x, h = r.y < n.y ? r.y < s.y ? r.y : s.y : n.y <
				s.y ? n.y : s.y, l = r.x > n.x ? r.x > s.x ? r.x : s.x : n.x > s.x ? n.x : s.x, u = r.y > n.y ? r.y > s.y ? r.y :
				s.y : n.y > s.y ? n.y : s.y, _ = _t(a, h, e, i, o), p = _t(l, u, e, i, o), c = t.prevZ, f = t.nextZ; c && c.z >= _ &&
			f && f.z <= p;) {
			if (c !== t.prev && c !== t.next && ct(r.x, r.y, n.x, n.y, s.x, s.y, c.x, c.y) && 0 <= ft(c.prev, c, c.next)) return !
				1;
			if (c = c.prevZ, f !== t.prev && f !== t.next && ct(r.x, r.y, n.x, n.y, s.x, s.y, f.x, f.y) && 0 <= ft(f.prev, f, f
					.next)) return !1;
			f = f.nextZ
		}
		for (; c && c.z >= _;) {
			if (c !== t.prev && c !== t.next && ct(r.x, r.y, n.x, n.y, s.x, s.y, c.x, c.y) && 0 <= ft(c.prev, c, c.next)) return !
				1;
			c = c.prevZ
		}
		for (; f && f.z <= p;) {
			if (f !== t.prev && f !== t.next && ct(r.x, r.y, n.x, n.y, s.x, s.y, f.x, f.y) && 0 <= ft(f.prev, f, f.next)) return !
				1;
			f = f.nextZ
		}
		return !0
	}

	function at(t, e, i) {
		var o = t;
		do {
			var r = o.prev,
				n = o.next.next;
			!gt(r, n) && dt(r, o, o.next, n) && vt(r, n) && vt(n, r) && (e.push(r.i / i), e.push(o.i / i), e.push(n.i / i), Mt(
				o), Mt(o.next), o = t = n), o = o.next
		} while (o !== t);
		return ot(o)
	}

	function ht(t, e, i, o, r, n) {
		var s, a, h = t;
		do {
			for (var l = h.next.next; l !== h.prev;) {
				if (h.i !== l.i && (a = l, (s = h).next.i !== a.i && s.prev.i !== a.i && ! function(t, e) {
						var i = t;
						do {
							if (i.i !== t.i && i.next.i !== t.i && i.i !== e.i && i.next.i !== e.i && dt(i, i.next, t, e)) return !0;
							i = i.next
						} while (i !== t);
						return !1
					}(s, a) && (vt(s, a) && vt(a, s) && function(t, e) {
						var i = t,
							o = !1,
							r = (t.x + e.x) / 2,
							n = (t.y + e.y) / 2;
						for (; i.y > n != i.next.y > n && i.next.y !== i.y && r < (i.next.x - i.x) * (n - i.y) / (i.next.y - i.y) + i.x &&
							(o = !o), i = i.next, i !== t;);
						return o
					}(s, a) && (ft(s.prev, s, a.prev) || ft(s, a.prev, a)) || gt(s, a) && 0 < ft(s.prev, s, s.next) && 0 < ft(a.prev,
						a, a.next)))) {
					var u = xt(h, l);
					return h = ot(h, h.next), u = ot(u, u.next), rt(h, e, i, o, r, n), void rt(u, e, i, o, r, n)
				}
				l = l.next
			}
			h = h.next
		} while (h !== t)
	}

	function lt(t, e) {
		return t.x - e.x
	}

	function ut(t, e) {
		if (e = function(t, e) {
				var i, o = e,
					r = t.x,
					n = t.y,
					s = -1 / 0;
				do {
					if (n <= o.y && n >= o.next.y && o.next.y !== o.y) {
						var a = o.x + (n - o.y) * (o.next.x - o.x) / (o.next.y - o.y);
						if (a <= r && s < a) {
							if ((s = a) === r) {
								if (n === o.y) return o;
								if (n === o.next.y) return o.next
							}
							i = o.x < o.next.x ? o : o.next
						}
					}
					o = o.next
				} while (o !== e);
				if (!i) return null;
				if (r === s) return i;
				var h, l = i,
					u = i.x,
					_ = i.y,
					p = 1 / 0;
				o = i;
				for (; r >= o.x && o.x >= u && r !== o.x && ct(n < _ ? r : s, n, u, _, n < _ ? s : r, n, o.x, o.y) && (h = Math.abs(
						n - o.y) / (r - o.x), vt(o, t) && (h < p || h === p && (o.x > i.x || o.x === i.x && (f = o, ft((c = i).prev, c,
						f.prev) < 0 && ft(f.next, c, c.next) < 0))) && (i = o, p = h)), o = o.next, o !== l;);
				var c, f;
				return i
			}(t, e)) {
			var i = xt(e, t);
			ot(i, i.next)
		}
	}

	function _t(t, e, i, o, r) {
		return (t = 1431655765 & ((t = 858993459 & ((t = 252645135 & ((t = 16711935 & ((t = 32767 * (t - i) * r) | t << 8)) |
			t << 4)) | t << 2)) | t << 1)) | (e = 1431655765 & ((e = 858993459 & ((e = 252645135 & ((e = 16711935 & ((e =
			32767 * (e - o) * r) | e << 8)) | e << 4)) | e << 2)) | e << 1)) << 1
	}

	function pt(t) {
		for (var e = t, i = t;
			(e.x < i.x || e.x === i.x && e.y < i.y) && (i = e), (e = e.next) !== t;);
		return i
	}

	function ct(t, e, i, o, r, n, s, a) {
		return 0 <= (r - s) * (e - a) - (t - s) * (n - a) && 0 <= (t - s) * (o - a) - (i - s) * (e - a) && 0 <= (i - s) * (n -
			a) - (r - s) * (o - a)
	}

	function ft(t, e, i) {
		return (e.y - t.y) * (i.x - e.x) - (e.x - t.x) * (i.y - e.y)
	}

	function gt(t, e) {
		return t.x === e.x && t.y === e.y
	}

	function dt(t, e, i, o) {
		var r = mt(ft(t, e, i)),
			n = mt(ft(t, e, o)),
			s = mt(ft(i, o, t)),
			a = mt(ft(i, o, e));
		return r !== n && s !== a || (!(0 !== r || !yt(t, i, e)) || (!(0 !== n || !yt(t, o, e)) || (!(0 !== s || !yt(i, t, o)) ||
			!(0 !== a || !yt(i, e, o)))))
	}

	function yt(t, e, i) {
		return e.x <= Math.max(t.x, i.x) && e.x >= Math.min(t.x, i.x) && e.y <= Math.max(t.y, i.y) && e.y >= Math.min(t.y, i
			.y)
	}

	function mt(t) {
		return 0 < t ? 1 : t < 0 ? -1 : 0
	}

	function vt(t, e) {
		return ft(t.prev, t, t.next) < 0 ? 0 <= ft(t, e, t.next) && 0 <= ft(t, t.prev, e) : ft(t, e, t.prev) < 0 || ft(t, t.next,
			e) < 0
	}

	function xt(t, e) {
		var i = new Tt(t.i, t.x, t.y),
			o = new Tt(e.i, e.x, e.y),
			r = t.next,
			n = e.prev;
		return (t.next = e).prev = t, (i.next = r).prev = i, (o.next = i).prev = o, (n.next = o).prev = n, o
	}

	function wt(t, e, i, o) {
		var r = new Tt(t, e, i);
		return o ? (r.next = o.next, (r.prev = o).next.prev = r, o.next = r) : (r.prev = r).next = r, r
	}

	function Mt(t) {
		t.next.prev = t.prev, t.prev.next = t.next, t.prevZ && (t.prevZ.nextZ = t.nextZ), t.nextZ && (t.nextZ.prevZ = t.prevZ)
	}

	function Tt(t, e, i) {
		this.i = t, this.x = e, this.y = i, this.prev = null, this.next = null, this.z = null, this.prevZ = null, this.nextZ =
			null, this.steiner = !1
	}

	function bt(t, e, i, o) {
		for (var r = 0, n = e, s = i - o; n < i; n += o) r += (t[s] - t[n]) * (t[n + 1] + t[s + 1]), s = n;
		return r
	}
	et.deviation = function(t, e, i, o) {
		var r = e && e.length,
			n = r ? e[0] * i : t.length,
			s = Math.abs(bt(t, 0, n, i));
		if (r)
			for (var a = 0, h = e.length; a < h; a++) {
				var l = e[a] * i,
					u = a < h - 1 ? e[a + 1] * i : t.length;
				s -= Math.abs(bt(t, l, u, i))
			}
		var _ = 0;
		for (a = 0; a < o.length; a += 3) {
			var p = o[a] * i,
				c = o[a + 1] * i,
				f = o[a + 2] * i;
			_ += Math.abs((t[p] - t[f]) * (t[1 + c] - t[1 + p]) - (t[p] - t[c]) * (t[1 + f] - t[1 + p]))
		}
		return 0 === s && 0 === _ ? 0 : Math.abs((_ - s) / s)
	}, et.flatten = function(t) {
		for (var e = t[0][0].length, i = {
				vertices: [],
				holes: [],
				dimensions: e
			}, o = 0, r = 0; r < t.length; r++) {
			for (var n = 0; n < t[r].length; n++)
				for (var s = 0; s < e; s++) i.vertices.push(t[r][n][s]);
			0 < r && (o += t[r - 1].length, i.holes.push(o))
		}
		return i
	}, $.default = tt;
	var Ct = (Et.prototype.getDrawInfo = function() {
		return {
			id: this._id,
			info: this._geometryInfo,
			type: this._type,
			taskId: this._taskId
		}
	}, Et);

	function Et(t) {
		this._geometryInfo = [], this._features = t.features, this._id = t.id, this._offset = t.offset, this._layout = t.layout,
			this._type = t.type, this._taskId = t.taskId
	}
	var Lt = (It.getId = function(t) {
		return void 0 === t && (t = "nag"), t + "-" + (It.id += 1)
	}, It.id = 0, It);

	function It() {}
	var Rt = {
			parseColor: function(t) {
				if (!t) return [0, 0, 0, 1];
				var e = [];
				if ("#" === t.substr(0, 1)) {
					for (var i = t.slice(1), o = 0; o < 5; o += 2) {
						var r = parseInt(i.substr(o, 2), 16) / 255;
						e.push(r || 0)
					}
					e.push(1)
				} else if ("rgba" === t.substr(0, 4)) {
					var n = (i = t.slice(5, -1)).split(",");
					for (o = 0; o < 3; o += 1) {
						r = Number(n[o]) / 255;
						e.push(r || 0)
					}
					e.push(Number(n[3]) || 1)
				} else if ("rgb" === t.substr(0, 3)) {
					for (n = (i = t.slice(4, -1)).split(","), o = 0; o < 3; o += 1) {
						r = Number(n[o]) / 255;
						e.push(r || 0)
					}
					e.push(1)
				}
				return 4 !== e.length ? [0, 0, 0, 1] : e
			},
			getStyle: function(t, e, i) {
				var o = t.keys,
					r = t.values,
					n = t[e];
				if (o && r && i)
					for (var s = 0; s < o.length; s += 1) {
						var a = r[i[o[s]]];
						if (a && void 0 !== a[e]) return n = a[e]
					}
				return n
			}
		},
		St = (Pt.prototype.add = function(t, e) {
			if (0 === e) this._value = this._value.concat(t);
			else
				for (var i = 0; i < t.length; i += 1) this._value.push(e + t[i])
		}, Pt.prototype.clear = function() {
			this._value = []
		}, Pt.prototype.getValue = function() {
			return this._value
		}, Pt);

	function Pt(t) {
		void 0 === t && (t = []), this._value = t
	}
	var Ft, At = (e(Vt, Ft = Ct), Vt.prototype.init = function() {
		for (var t = 0; t < this._features.length; t += 1) {
			var e = this._features[t],
				i = e.geometry,
				o = e.properties;
			if (Rt.getStyle(this._layout, "visible", o))
				if ("Polygon" === i.type) this._calcPolygon(i.coordinates, o);
				else if ("MultiPolygon" === i.type)
				for (var r = 0; r < i.coordinates.length; r += 1) this._calcPolygon(i.coordinates[r], o)
		}
		for (var n in this._geometryMap) {
			var s = this._geometryMap[n];
			this._geometryInfo.push({
				vertices: s.vertices,
				fillIndices: s.fillIndices.getValue(),
				outlineIndices: s.outlineIndices.getValue(),
				fillColor: s.fillColor,
				outlineColor: s.outlineColor,
				base: s.base,
				opacity: s.opacity
			})
		}
	}, Vt.prototype._calcPolygon = function(t, e) {
		if (0 !== t.length) {
			for (var i = this._offset, o = [], r = [], n = [], s = Rt.getStyle(this._layout, "enableOutline", e), a = 0; a <
				t.length; a += 1) {
				for (var h = t[a], l = 0; l < h.length; l += 1) {
					if (s) {
						var u = o.length / 2;
						l < h.length - 1 && n.push(u, 1 + u)
					}
					o.push(h[l][0] + i[0], h[l][1] + i[1])
				}
				a < t.length - 1 && r.push(o.length / 2)
			}
			var _ = $(o, 0 === r.length ? void 0 : r, 2),
				p = Rt.parseColor(Rt.getStyle(this._layout, "fillColor", e)),
				c = Rt.parseColor(Rt.getStyle(this._layout, "outlineColor", e)),
				f = Rt.getStyle(this._layout, "base", e),
				g = Rt.getStyle(this._layout, "opacity", e),
				d = this._getGeometryKey(e);
			if (this._geometryMap[d] && this._geometryMap[d].vertices.length / 2 + o.length / 2 < 65536) {
				var y = this._geometryMap[d],
					m = y.vertices.length / 2;
				y.fillIndices.add(_, m), y.outlineIndices.add(n, m), y.vertices = y.vertices.concat(o)
			} else this._geometryMap[d] && (this._geometryMap[Lt.getId()] = this._geometryMap[d]), this._geometryMap[d] = {
				vertices: o,
				outlineColor: c,
				fillColor: p,
				fillIndices: new St(_),
				outlineIndices: new St(n),
				base: f,
				opacity: g
			}
		}
	}, Vt.prototype._getGeometryKey = function(t) {
		for (var e = [], i = 0; i < Vt.GEOMETRY_KEYS.length; i += 1) {
			var o = Rt.getStyle(this._layout, Vt.GEOMETRY_KEYS[i], t);
			void 0 !== o && e.push(o)
		}
		return e.join("-")
	}, Vt.GEOMETRY_KEYS = ["fillColor", "outlineColor", "base", "opacity"], Vt);

	function Vt() {
		var t = null !== Ft && Ft.apply(this, arguments) || this;
		return t._geometryMap = {}, t
	}
	var Nt = (Bt.prototype.unit = function() {
		var t = this.getLength();
		return 0 === t ? new Bt([0, 0]) : new Bt([0, 0], [this.x / t, this.y / t])
	}, Bt.prototype.normal = function() {
		return new Bt([0, 0], [-this.y, this.x])
	}, Bt.prototype.add = function(t) {
		return this.x += t.x, this.y += t.y, this
	}, Bt.prototype.subtract = function(t) {
		return this.x -= t.x, this.y -= t.y, this
	}, Bt.prototype.rotate = function(t) {
		var e = Math.cos(t),
			i = Math.sin(t),
			o = e * this.x - i * this.y,
			r = i * this.x + e * this.y;
		return this.x = o, this.y = r, this
	}, Bt.prototype.multiply = function(t) {
		return this.x *= t, this.y *= t, this
	}, Bt.prototype.dot = function(t) {
		return this.x * t.x + this.y * t.y
	}, Bt.prototype.angleTo = function(t) {
		var e = this.getLength() * t.getLength();
		if (0 == e) return 0;
		var i = (this.x * t.x + this.y * t.y) / e;
		1 < i ? i = 1 : i < -1 && (i = -1);
		var o = Math.acos(i) / Math.PI * 180;
		return (this.cross(t) < 0 ? 1 : -1) * o
	}, Bt.prototype.cross = function(t) {
		return this.x * t.y - t.x * this.y
	}, Bt.prototype.clone = function() {
		return new Bt([0, 0], [this.x, this.y])
	}, Bt.prototype.multiplyMat4 = function(t) {
		var e = t.getValue();
		return new Bt([e[0] * this.x + e[4] * this.y + e[12], e[1] * this.x + e[5] * this.y + e[13]])
	}, Bt.prototype.getLength = function() {
		return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2))
	}, Bt);

	function Bt(t, e) {
		e ? (this.x = e[0] - t[0], this.y = e[1] - t[1]) : (this.x = t[0], this.y = t[1])
	}
	var kt, Ot = (e(zt, kt = Ct), zt.prototype.init = function() {
		for (var t = 0; t < this._features.length; t += 1) this._update(this._features[t]);
		this._fireMessage()
	}, zt.prototype._fireMessage = function() {
		for (var t in this._geometryInfo.length = 0, this._geometryMap) {
			var e = this._geometryMap[t];
			this._geometryInfo.push({
				vertices: e.vertices,
				fillIndices: e.fillIndices.getValue(),
				outlineIndices: e.outlineIndices.getValue(),
				fillColor: e.fillColor,
				outlineColor: e.outlineColor,
				base: e.base,
				opacity: e.opacity,
				normals: e.normals,
				height: e.height,
				zoomRange: e.zoomRange
			})
		}
	}, zt.prototype._update = function(t) {
		var e = t.geometry,
			i = t.properties;
		if (Rt.getStyle(this._layout, "visible", i))
			if ("Polygon" === e.type) this._calcPolygon(e.coordinates, i);
			else if ("MultiPolygon" === e.type)
			for (var o = 0; o < e.coordinates.length; o += 1) this._calcPolygon(e.coordinates[o], i)
	}, zt.prototype._calcPolygon = function(t, e) {
		for (var i = this._offset, o = [], r = [], n = [], s = [], a = [], h = [], l = [], u = Rt.getStyle(this._layout,
				"enableOutline", e), _ = Rt.getStyle(this._layout, "height", e), p = 0; p < t.length; p += 1) {
			for (var c = t[p], f = 0; f < c.length; f += 1) {
				var g = c[f][0] + i[0],
					d = c[f][1] + i[1],
					y = r.length / 2;
				if (f < c.length - 1) {
					if (u) {
						var m = o.length / 2;
						a.push(m, 1 + m)
					}
					var v = new Nt(c[f], c[f + 1]).normal();
					h.push(v.x, v.y, 0), h.push(v.x, v.y, 1), h.push(v.x, v.y, 0), h.push(v.x, v.y, 1), n.push(0 + y, 1 + y, 2 + y),
						n.push(1 + y, 2 + y, 3 + y), r.push(g, d), r.push(g, d);
					var x = c[f + 1][0] + i[0],
						w = c[f + 1][1] + i[1];
					r.push(x, w), r.push(x, w)
				}
				l.push(0, 0, zt.FACTOR + 1), o.push(g, d)
			}
			p < t.length - 1 && s.push(o.length / 2)
		}
		var M = $(o, 0 === s.length ? void 0 : s, 2),
			T = o.length / 2;
		for (p = 0; p < n.length; p += 1) M.push(n[p] + T);
		var b = T + r.length / 2,
			C = Rt.parseColor(Rt.getStyle(this._layout, "fillColor", e)),
			E = Rt.parseColor(Rt.getStyle(this._layout, "outlineColor", e)),
			L = Rt.getStyle(this._layout, "base", e),
			I = Rt.getStyle(this._layout, "opacity", e),
			R = Rt.getStyle(this._layout, "zoomRange", e),
			S = this._getGeometryKey(e);
		if (this._geometryMap[S] && this._geometryMap[S].vertices.length / 2 + b < 65536) {
			var P = this._geometryMap[S],
				F = P.vertices.length / 2;
			P.fillIndices.add(M, F), P.outlineIndices.add(a, F), P.vertices = P.vertices.concat(o).concat(r), P.normals = P.normals
				.concat(l).concat(h)
		} else this._geometryMap[S] && (this._geometryMap[Lt.getId()] = this._geometryMap[S]), this._geometryMap[S] = {
			vertices: o.concat(r),
			normals: l.concat(h),
			fillIndices: new St(M),
			outlineIndices: new St(a),
			fillColor: C,
			outlineColor: E,
			height: _,
			base: L,
			opacity: I,
			zoomRange: R
		}
	}, zt.prototype._getGeometryKey = function(t) {
		for (var e = [], i = 0; i < zt.GEOMETRY_KEYS.length; i += 1) {
			var o = Rt.getStyle(this._layout, zt.GEOMETRY_KEYS[i], t);
			void 0 !== o && e.push(o)
		}
		return e.join("-")
	}, zt.GEOMETRY_KEYS = ["fillColor", "outlineColor", "height", "base", "opacity", "zoomRange"], zt.FACTOR = Math.pow(
		2, 13), zt);

	function zt() {
		var t = null !== kt && kt.apply(this, arguments) || this;
		return t._geometryMap = {}, t
	}
	var Dt, Ut = (e(Gt, Dt = Ct), Gt.prototype.init = function() {
		for (var t = 0; t < this._features.length; t += 1) {
			var e = this._features[t],
				i = e.geometry,
				o = e.properties;
			if (Rt.getStyle(this._layout, "visible", o))
				if ("Point" === i.type) this._calcPoint(i.coordinates, o);
				else if ("MultiPoint" === i.type)
				for (var r = 0; r < i.coordinates.length; r += 1) this._calcPoint(i.coordinates[r], o)
		}
	}, Gt.prototype._calcPoint = function(t, e) {
		var i = this._offset,
			o = [t[0] + i[0], t[1] + i[1]],
			r = Rt.parseColor(Rt.getStyle(this._layout, "color", e)),
			n = Rt.getStyle(this._layout, "base", e),
			s = Rt.getStyle(this._layout, "radius", e),
			a = Rt.getStyle(this._layout, "opacity", e);
		this._geometryInfo.push({
			color: r,
			base: n,
			point: o,
			radius: s,
			opacity: a
		})
	}, Gt);

	function Gt() {
		return null !== Dt && Dt.apply(this, arguments) || this
	}
	var Wt, Zt = (e(jt, Wt = Ct), jt.prototype.init = function() {
		for (var t = 0; t < this._features.length; t += 1) {
			var e = this._features[t],
				i = e.geometry,
				o = e.properties;
			if (Rt.getStyle(this._layout, "visible", o))
				if ("Point" === i.type) this._calcPoint(i.coordinates, this._features[t]);
				else if ("MultiPoint" === i.type)
				for (var r = 0; r < i.coordinates.length; r += 1) this._calcPoint(i.coordinates[r], this._features[t])
		}
	}, jt.prototype._calcPoint = function(t, e) {
		var i = this._offset,
			o = [t[0] + i[0], t[1] + i[1]],
			r = Rt.getStyle(this._layout, "opacity", e.properties),
			n = Rt.getStyle(this._layout, "base", e.properties),
			s = Rt.getStyle(this._layout, "iconZHeight", e.properties),
			a = Rt.getStyle(this._layout, "textZHeight", e.properties);
		s && a ? n += (s + a) / 2 : s ? n += s : a && (n += a);
		var h = this._calcImage(o, e, n, r),
			l = this._calcText(o, e, n, r),
			u = Rt.getStyle(this._layout, "collision", e.properties),
			_ = {
				point: o,
				data: [],
				weight: Rt.getStyle(this._layout, "weight", e.properties),
				margin: Rt.getStyle(this._layout, "margin", e.properties),
				zoomRange: Rt.getStyle(this._layout, "zoomRange", e.properties)
			},
			p = [];
		h && l ? (_.data.push(h.collision, l.collision), p.push(h.geometry, l.geometry)) : h ? (_.data.push(h.collision),
			p.push(h.geometry)) : l && (_.data.push(l.collision), p.push(l.geometry)), this._geometryInfo.push({
			data: p,
			isCollision: u,
			collision: _
		})
	}, jt.prototype._calcImage = function(t, e, i, o) {
		if (e.iconSize) {
			var r = Rt.getStyle(this._layout, "iconImage", e.properties),
				n = Rt.getStyle(this._layout, "iconAnchor", e.properties),
				s = Rt.getStyle(this._layout, "iconOffset", e.properties),
				a = Rt.getStyle(this._layout, "iconSize", e.properties),
				h = e.iconSize[0] * a,
				l = e.iconSize[1] * a,
				u = c(t, h, l, n);
			return {
				geometry: {
					point: t,
					vertices: u.vertices,
					texCoords: u.texCoords,
					offset: s,
					base: i,
					opacity: o,
					iconUrl: r
				},
				collision: {
					width: h,
					height: l,
					anchor: n,
					offset: s
				}
			}
		}
	}, jt.prototype._calcText = function(t, e, i, o) {
		if (e.textSize && e.textArr) {
			var r = Rt.getStyle(this._layout, "textSize", e.properties),
				n = Rt.getStyle(this._layout, "textAnchor", e.properties),
				s = Rt.getStyle(this._layout, "textOffset", e.properties),
				a = e.textSize[0] * r / this._baseTextSize,
				h = e.textSize[1] * r / this._baseTextSize,
				l = Rt.getStyle(this._layout, "textColor", e.properties),
				u = Rt.getStyle(this._layout, "textStrokeColor", e.properties),
				_ = c(t, a, h, n);
			return {
				geometry: {
					point: t,
					vertices: _.vertices,
					texCoords: _.texCoords,
					offset: s,
					base: i,
					opacity: o,
					textOptions: {
						textArr: e.textArr,
						width: e.textSize[0],
						height: e.textSize[1],
						fillColor: l,
						strokeColor: u
					}
				},
				collision: {
					width: a,
					height: h,
					anchor: n,
					offset: s
				}
			}
		}
	}, jt);

	function jt(t) {
		var e = Wt.call(this, t) || this;
		return e._baseTextSize = t.baseTextSize, e
	}
	var Yt, Ht = (e(qt, Yt = Ct), qt.prototype.init = function() {
		for (var t = 0; t < this._features.length; t += 1) {
			var e = this._features[t],
				i = e.geometry,
				o = e.properties;
			if (Rt.getStyle(this._layout, "visible", o))
				if ("LineString" === i.type) this._calcPolyline(i.coordinates, o);
				else if ("MultiLineString" === i.type)
				for (var r = 0; r < i.coordinates.length; r += 1) this._calcPolyline(i.coordinates[r], o)
		}
	}, qt.prototype._calcPolyline = function(t, e) {
		for (var i = this._offset, o = Rt.getStyle(this._layout, "base", e), r = Rt.getStyle(this._layout, "opacity", e),
				n = Rt.parseColor(Rt.getStyle(this._layout, "color", e)), s = Rt.getStyle(this._layout, "width", e), a = Rt.getStyle(
					this._layout, "icon", e), h = [], l = [], u = [], _ = 0; _ < t.length; _ += 1) {
			var p = [t[_][0] + i[0], t[_][1] + i[1], t[_][2]];
			if (0 === _) {
				var c = [t[_][0] + i[0], t[_][2]],
					f = [t[_ + 1][0] + i[0], t[_ + 1][2]],
					g = new Nt(c, f).normal().unit();
				l.push(g.x, g.y, -g.x, -g.y), h.push.apply(h, G(p, p)), u.push(0, 1, 0, 0)
			} else if (_ < t.length - 1) {
				var d = [t[_ - 1][0] + i[0], t[_ - 1][2]],
					y = [t[_][0] + i[0], t[_][2]],
					m = [t[_ + 1][0] + i[0], t[_ + 1][2]],
					v = new Nt(d, y),
					x = v.normal().unit();
				l.push(x.x, x.y, -x.x, -x.y), h.push.apply(h, G(p, p)), u.push(1 * v.getLength(), 1, 1 * v.getLength(), 0);
				var w = new Nt(y, m).normal().unit();
				l.push(w.x, w.y, -w.x, -w.y), h.push.apply(h, G(p, p)), u.push(0, 1, 0, 0)
			} else {
				c = [t[_ - 1][0] + i[0], t[_ - 1][2]], f = [t[_][0] + i[0], t[_][2]];
				var M = new Nt(c, f);
				g = M.normal().unit(), l.push(g.x, g.y, -g.x, -g.y), h.push.apply(h, G(p, p)), u.push(1 * M.getLength(), 1, 1 *
					M.getLength(), 0)
			}
		}
		this._geometryInfo.push({
			vertices: h,
			normals: l,
			base: o,
			opacity: r,
			width: s,
			color: n,
			iconUrl: a,
			texCoords: u
		})
	}, qt);

	function qt() {
		return null !== Yt && Yt.apply(this, arguments) || this
	}
	var Xt, Kt = (e(Qt, Xt = Ct), Qt.prototype.init = function() {
		for (var t = 0; t < this._features.length; t += 1) {
			var e = this._features[t],
				i = e.geometry,
				o = e.properties;
			if (Rt.getStyle(this._layout, "visible", o))
				if ("Point" === i.type) this._calcPoint(i.coordinates, o);
				else if ("MultiPoint" === i.type)
				for (var r = 0; r < i.coordinates.length; r += 1) this._calcPoint(i.coordinates[r], o)
		}
	}, Qt.prototype._calcPoint = function(t, e) {
		var i = this._offset,
			o = [t[0] + i[0], t[1] + i[1]],
			r = Rt.getStyle(this._layout, "radius", e);
		this._geometryInfo.push({
			point: o,
			radius: r
		})
	}, Qt);

	function Qt() {
		return null !== Xt && Xt.apply(this, arguments) || this
	}
	var Jt, $t = (e(te, Jt = Ct), te.prototype.init = function() {
		for (var t = 0; t < this._features.length; t += 1) {
			var e = this._features[t],
				i = e.properties,
				o = e.geometry;
			if (Rt.getStyle(this._layout, "visible", i))
				if ("LineString" === o.type) this._calcPolyline(o.coordinates, i);
				else if ("MultiLineString" === o.type)
				for (var r = 0; r < o.coordinates.length; r += 1) this._calcPolyline(o.coordinates[r], i)
		}
		for (var n in this._geometryMap) this._geometryInfo.push(m(m({}, this._geometryMap[n]), {
			indices: this._geometryMap[n].indices.getValue()
		}))
	}, te.prototype._calcPolyline = function(t, e) {
		for (var i = this._offset, o = Rt.getStyle(this._layout, "base", e), r = Rt.getStyle(this._layout, "opacity", e),
				n = Rt.getStyle(this._layout, "lineWidth", e), s = Rt.parseColor(Rt.getStyle(this._layout, "lineColor", e)), a =
				Rt.getStyle(this._layout, "lineImage", e), h = [], l = [], u = [], _ = [], p = [], c = 0; c < t.length; c += 1) {
			var f = [t[c][0] + i[0], t[c][1] + i[1]],
				g = h.length / 2;
			if (0 === c) {
				var d = (k = new Nt(t[c], t[c + 1])).normal().unit();
				h.push.apply(h, G(f, f)), _.push(0, 1, 0, 0), u.push(0, 0, 0, 0, 0, 0), l.push(d.x, d.y, -d.x, -d.y), p.push(g +
					0, g + 1)
			} else if (c < t.length - 1) {
				var y = [t[c - 1][0] + i[0], t[c - 1][1] + i[1]],
					m = [t[c + 1][0] + i[0], t[c + 1][1] + i[1]],
					v = new Nt(y, f),
					x = v.getLength(),
					w = v.unit(),
					M = w.normal(),
					T = new Nt(f, m),
					b = T.getLength(),
					C = T.unit(),
					E = C.normal(),
					L = Math.abs(M.angleTo(E));
				L = (L = 180 === L ? 0 : L) / 180 * Math.PI;
				var I = Math.tan(L / 2);
				w.multiply(-I), C.multiply(I), h.push.apply(h, G(f, f)), _.push(1 * x, 1, 1 * x, 0), u.push(w.x, w.y, x, w.x, w.y,
					x), p.push(g, g - 1, g, g + 1), l.push(M.x, M.y, -M.x, -M.y);
				var R = M.cross(E) <= 0 ? -1 : 1;
				h.push.apply(h, G(f, f)), _.push(0, -1 == R ? 1 : 0, 0, -1 == R ? 0 : .93), u.push(w.x, w.y, x, w.x, w.y, x), l.push(
					M.x, M.y, -M.x, -M.y), g += 2;
				var S = te.getLineJoin(f, M, E, h.length / 2),
					P = S.indices,
					F = S.vertices,
					A = S.normals,
					V = S.texCoords,
					N = S.deviation;
				h.push.apply(h, F), p.push.apply(p, P), l.push.apply(l, A), u.push.apply(u, N), _.push.apply(_, V), h.push.apply(
					h, G(f, f)), _.push(0, -1 == R ? 1 : 0, 0, -1 == R ? 0 : .93), u.push(C.x, C.y, b, C.x, C.y, b), l.push(E.x, E
					.y, -E.x, -E.y), g += 2;
				var B = F.length / 2;
				h.push.apply(h, G(f, f)), _.push(0, 1, 0, 0), u.push(C.x, C.y, b, C.x, C.y, b), p.push(g + 2 + B, g + 3 + B), l.push(
					E.x, E.y, -E.x, -E.y)
			} else {
				y = [t[c - 1][0] + i[0], t[c - 1][1] + i[1]];
				var k, O = (k = new Nt(y, f)).getLength();
				d = k.normal().unit(), h.push.apply(h, G(f, f)), u.push(0, 0, 0, 0, 0, 0), _.push(1 * O, 1, 1 * O, 0), p.push(g,
					g - 1, g, g + 1), l.push(d.x, d.y, -d.x, -d.y)
			}
		}
		var z = this._getGeometryKey(e);
		if (this._geometryMap[z] && this._geometryMap[z].vertices.length / 2 + h.length / 2 < 65536) {
			var D = this._geometryMap[z],
				U = D.vertices.length / 2;
			D.indices.add(p, U), D.vertices = D.vertices.concat(h), D.texCoords = D.texCoords.concat(_), D.normals = D.normals
				.concat(l), D.deviation = D.deviation.concat(u)
		} else this._geometryMap[z] = {
			vertices: h,
			normals: l,
			base: o,
			opacity: r,
			width: n,
			color: s,
			deviation: u,
			iconUrl: a,
			texCoords: _,
			indices: new St(p)
		}
	}, te.prototype._getGeometryKey = function(t) {
		for (var e = [], i = 0; i < te.GEOMETRY_KEYS.length; i += 1) {
			var o = Rt.getStyle(this._layout, te.GEOMETRY_KEYS[i], t);
			void 0 !== o && e.push(o)
		}
		return e.join("-")
	}, te.getLineJoin = function(t, e, i, o) {
		var r = [],
			n = [],
			s = [],
			a = [],
			h = [],
			l = Math.PI / 16,
			u = Math.abs(e.angleTo(i)) / 180 * Math.PI + l,
			_ = e.clone().add(i).unit(),
			p = _.normal(),
			c = e.unit().normal(),
			f = 1 / p.dot(c),
			g = e.cross(i) <= 0 ? -1 : 1;
		_.multiply(f * g), r.push.apply(r, t), n.push(0, .7), s.push(0, 0, 0), a.push(0, 0), l < u && h.push(o - 1, o, o +
			1, o - 2, o - 1, -1 == g ? o + 1 : o);
		for (var d = e.clone().multiply(-1 * g), y = o, m = 0; m < u; m += l) {
			var v = d.clone().rotate(m * g);
			r.push.apply(r, t), n.push(0, .93), s.push(0, 0, 0), a.push(v.x, v.y), m + l < u ? (h.push(o + 0), h.push(y + 1),
				h.push(y + 2)) : h.push(o, y + 1, y + 3, -1 == g ? y + 1 : o, y + 2, y + 3), y += 1
		}
		return {
			vertices: r,
			indices: h,
			normals: a,
			texCoords: n,
			deviation: s
		}
	}, te.GEOMETRY_KEYS = ["lineColor", "lineWidth", "base", "opacity", "lineImage"], te);

	function te() {
		var t = null !== Jt && Jt.apply(this, arguments) || this;
		return t._geometryMap = {}, t
	}
	var ee, ie = (e(oe, ee = Ct), oe.prototype.init = function() {
		for (var t = 0; t < this._features.length; t += 1) {
			var e = this._features[t],
				i = e.geometry,
				o = e.properties;
			if (Rt.getStyle(this._layout, "visible", o))
				if ("Point" === i.type) this._calcPoint(i.coordinates, o);
				else if ("MultiPoint" === i.type)
				for (var r = 0; r < i.coordinates.length; r += 1) this._calcPoint(i.coordinates[r], o)
		}
	}, oe.prototype._calcPoint = function(t, e) {
		var i = Rt.getStyle(this._layout, "url", e);
		if (i) {
			var o = this._offset;
			if (Rt.getStyle(this._layout, "visible", e)) {
				var r = new T,
					n = [t[0] + o[0], t[1] + o[1]],
					s = Rt.getStyle(this._layout, "base", e),
					a = Rt.getStyle(this._layout, "size", e),
					h = Rt.getStyle(this._layout, "rotateX", e),
					l = Rt.getStyle(this._layout, "rotateY", e),
					u = Rt.getStyle(this._layout, "rotateZ", e),
					_ = Rt.getStyle(this._layout, "opacity", e);
				r.scale(a, a, a), r.rotate(h, 1, 0, 0), r.rotate(l, 0, 1, 0), r.rotate(u, 0, 0, 1), this._geometryInfo.push({
					matrix: r.getValue(),
					opacity: _,
					point: n,
					base: s,
					url: i
				})
			}
		}
	}, oe);

	function oe() {
		return null !== ee && ee.apply(this, arguments) || this
	}
	var re, ne = (e(se, re = Ct), se.prototype.init = function() {
		for (var t = 0; t < this._features.length; t += 1) {
			var e = this._features[t],
				i = e.geometry,
				o = e.properties;
			if (Rt.getStyle(this._layout, "visible", o))
				if ("LineString" === i.type) this._calcPolyline(i.coordinates, o);
				else if ("MultiLineString" === i.type)
				for (var r = 0; r < i.coordinates.length; r += 1) this._calcPolyline(i.coordinates[r], o)
		}
		for (var n in this._geometryMap) this._geometryInfo.push(m(m({}, this._geometryMap[n]), {
			indices: this._geometryMap[n].indices.getValue()
		}))
	}, se.prototype._calcPolyline = function(t, e) {
		if (!(t.length < 2)) {
			for (var i = [], o = this._offset, r = [], n = 0; n < t.length; n += 1) {
				var s = t[n],
					a = s[0],
					h = s[1];
				i.push(a + o[0], h + o[1]), n + 1 < t.length && r.push(n, n + 1)
			}
			var l = Rt.parseColor(Rt.getStyle(this._layout, "color", e)),
				u = Rt.getStyle(this._layout, "base", e),
				_ = Rt.getStyle(this._layout, "opacity", e),
				p = this._getGeometryKey(e);
			if (this._geometryMap[p] && this._geometryMap[p].vertices.length / 2 + i.length / 2 < 65536) {
				var c = this._geometryMap[p],
					f = c.vertices.length / 2;
				c.indices.add(r, f), c.vertices = c.vertices.concat(i)
			} else this._geometryMap[p] && (this._geometryMap[Lt.getId()] = this._geometryMap[p]), this._geometryMap[p] = {
				vertices: i,
				color: l,
				base: u,
				indices: new St(r),
				opacity: _
			}
		}
	}, se.prototype._getGeometryKey = function(t) {
		for (var e = [], i = 0; i < se.GEOMETRY_KEYS.length; i += 1) {
			var o = Rt.getStyle(this._layout, se.GEOMETRY_KEYS[i], t);
			void 0 !== o && e.push(o)
		}
		return e.join("-")
	}, se.GEOMETRY_KEYS = ["color", "base", "opacity"], se);

	function se() {
		var t = null !== re && re.apply(this, arguments) || this;
		return t._geometryMap = {}, t
	}
	var ae, he = (e(le, ae = Ct), le.prototype.init = function() {
		for (var t = 0; t < this._features.length; t += 1) {
			var e = this._features[t],
				i = e.geometry,
				o = e.properties;
			if (Rt.getStyle(this._layout, "visible", o))
				if ("Point" === i.type) this._calcPoint(i.coordinates, this._features[t]);
				else if ("MultiPoint" === i.type)
				for (var r = 0; r < i.coordinates.length; r += 1) this._calcPoint(i.coordinates[r], this._features[t])
		}
	}, le.prototype._calcPoint = function(t, e) {
		var i = this._offset,
			o = Rt.getStyle(this._layout, "iconImage", e.properties);
		if (o) {
			var r = [t[0] + i[0], t[1] + i[1]],
				n = Rt.getStyle(this._layout, "base", e.properties),
				s = Rt.getStyle(this._layout, "size", e.properties),
				a = Rt.getStyle(this._layout, "rotate", e.properties),
				h = Rt.getStyle(this._layout, "opacity", e.properties),
				l = c(r, e.imgSize[0] * s, e.imgSize[1] * s, "center");
			this._geometryInfo.push({
				opacity: h,
				base: n,
				rotate: a,
				point: r,
				vertices: l.vertices,
				iconUrl: o,
				texCoords: l.texCoords,
				index: e.index
			})
		}
	}, le);

	function le() {
		return null !== ae && ae.apply(this, arguments) || this
	}
	var ue = (_e.prototype.calculate = function(t) {
		var e;
		if ("fill" === t.type ? e = new At(t) : "fillExtrusion" === t.type ? e = new Ot(t) : "circle" === t.type ? e = new Ut(
				t) : "symbol" === t.type ? e = new Zt(t) : "connection" === t.type ? e = new Ht(t) : "heatmap" === t.type ? e =
			new Kt(t) : "line" === t.type ? e = new $t(t) : "model" === t.type ? e = new ie(t) : "track" === t.type ? e = new ne(
				t) : "picture" === t.type && (e = new he(t)), e) return e.init(), e.getDrawInfo()
	}, _e);

	function _e() {}
	var pe = (ce.prototype.enableNormalize = function() {
		this._isInNormalize = !0
	}, ce.prototype.isInNormalize = function() {
		return this._isInNormalize
	}, ce.prototype._onMessage = function(t) {
		var e = this._taskMap.get(t.id);
		if (e) {
			e.indexOf(t.taskId) === e.length - 1 && this._taskMap.delete(t.id), t.isRender = !this._isInNormalize || 0 ===
				this._taskMap.size, 0 === this._taskMap.size && (this._isInNormalize = !1);
			var i = this._listeners.get(t.id);
			i && i(t)
		}
	}, ce.prototype.update = function(e) {
		var t = this._taskMap.get(e.id);
		if (t ? t.push(e.taskId) : this._taskMap.set(e.id, [e.taskId]), 0 < this._freeIndies.length) this._update(e);
		else if (e.sync) {
			var i = this._factor.calculate(e);
			i && this._onMessage(i)
		} else {
			var o = this._dataList.findIndex(function(t) {
				return t.id === e.id
			}); - 1 === o ? this._dataList.push(e) : this._dataList[o] = e
		}
	}, ce.prototype._update = function(t) {
		if (0 !== this._freeIndies.length) {
			var e = this._freeIndies.pop();
			this._workerPool[e].postMessage(t)
		}
	}, ce.prototype.register = function(t, e) {
		this._listeners.set(t, e)
	}, ce.prototype.unregister = function(t) {
		this._listeners.delete(t)
	}, ce.prototype.clearRegister = function() {
		this._listeners.clear()
	}, ce.prototype.clear = function() {
		this._dataList.length = 0, this._taskMap.clear()
	}, ce.prototype.destroy = function() {
		this.clear();
		for (var t = 0; t < this._workerPool.length; t += 1) this._workerPool[t].terminate();
		this._listeners.clear()
	}, ce);

	function ce() {
		var o = this;
		this._workerPool = [], this._freeIndies = [], this._dataList = [], this._taskMap = new Map, this._isInNormalize = !1,
			this._factor = new ue, this._listeners = new Map;
		for (var t = (navigator.hardwareConcurrency || 4) - 1, e = function(i) {
				r._workerPool.push(new U), r._freeIndies.push(i), r._workerPool[i].addEventListener("message", function(t) {
					if (o._freeIndies.push(i), o._onMessage(t.data), 0 < o._dataList.length) {
						var e = o._dataList.shift();
						o._update(e)
					}
				})
			}, r = this, i = 0; i < t; i += 1) e(i)
	}
	var fe, ge = {
			createCanvas: function(t, e, i) {
				void 0 === i && (i = 1);
				var o = document.createElement("canvas");
				return o.width = t * i, o.height = e * i, o.textContent = "Your browser is not support canvas", o.style.width = t +
					"px", o.style.height = e + "px", o
			},
			getWebglRender: function(t, e) {
				var i = t.getContext("webgl", e) || t.getContext("experimental-webgl", e);
				if (!i) throw new Error("webgl is not support");
				return i
			},
			getContainerRange: function(t) {
				return {
					clientWidth: t.clientWidth || 400,
					clientHeight: t.clientHeight || 300
				}
			}
		},
		de = (e(ye, fe = i), ye.prototype.getBucketMng = function() {
			return this._bucketMng
		}, ye.prototype.getCollisionMng = function() {
			return this._collisionMng
		}, ye.prototype._onCollisionChange = function(t) {
			var e = t.hideResult,
				i = t.showResult,
				o = t.normalResult;
			this._hideResult = {
				data: e,
				opacity: 1
			}, this._showResult = {
				data: i,
				opacity: 0
			}, this._normalResult = {
				data: o,
				opacity: 1
			}, t.isForce && !this._bucketMng.isInNormalize() && this.render()
		}, ye.prototype._startRenderQueue = function() {
			this._renderTimer || this._frameRender()
		}, ye.prototype._frameRender = function() {
			var t = Boolean(this._showResult || this._hideResult);
			0 !== this._renderQueue.length || t ? (this._renderQueue.pop(), this._draw(), this._renderTimer =
				requestAnimationFrame(this._frameRender)) : this._stopRenderQueue()
		}, ye.prototype._stopRenderQueue = function() {
			this._renderTimer && (cancelAnimationFrame(this._renderTimer), delete this._renderTimer)
		}, ye.prototype.resize = function() {
			var t = this._container,
				e = t.clientWidth,
				i = t.clientHeight;
			0 !== e && 0 !== i && (this._canvas.width = e * window.devicePixelRatio, this._canvas.height = i * window.devicePixelRatio,
				this._canvas.style.width = e + "px", this._canvas.style.height = i + "px", this._gl.viewport(0, 0, this._canvas.width,
					this._canvas.height), this._glContext.resize(this._canvas.width, this._canvas.height), this._camera.resize(e, i),
				this._collisionMng.resize(e, i), this.updateCollision())
		}, ye.prototype.setOffset = function(t, e) {
			this._camera.setOffset([t, e])
		}, ye.prototype.getOffset = function() {
			return this._camera.getOffset()
		}, ye.prototype.addLayer = function(t) {
			this._layers.push(t), t.onAdd(this)
		}, ye.prototype.removeLayer = function(e, t) {
			void 0 === t && (t = !0);
			var i = this._layers.findIndex(function(t) {
				return t.id === e.id
			}); - 1 !== i && (e.unbind(), this._layers.splice(i, 1), t && e.onRemove())
		}, ye.prototype.updateCollision = function(t) {
			void 0 === t && (t = !0), this._collisionMng.update(t)
		}, ye.prototype.sortLayer = function() {
			for (var i = this, t = new Map, e = 0; e < this._layers.length; e += 1) {
				var o = this._layers[e].getGroupId();
				if (o) {
					var r = t.get(o);
					r ? r.push(this._layers[e]) : t.set(o, [this._layers[e]])
				}
			}
			this._layers.length = 0, t.forEach(function(t) {
				var e;
				f(t, function(t, e) {
					return t.getOrder() - e.getOrder()
				}), (e = i._layers).push.apply(e, t)
			})
		}, ye.prototype.clear = function() {
			for (var t = 0; t < this._layers.length; t += 1) this._layers[t].unbind();
			this._layers.length = 0, this._collisionMng.clear()
		}, ye.prototype.render = function() {
			0 === this._renderQueue.length && (this._renderQueue.push("render"), this._startRenderQueue())
		}, ye.prototype._draw = function() {
			if (this._showResult && (this._showResult.opacity += this._collisionMng.getStep(), 1 <= this._showResult.opacity)) {
				for (var t in this._showResult.data) {
					var e = this._showResult.data[t],
						i = this._normalResult.data[t];
					i ? i.push.apply(i, e) : this._normalResult.data[t] = e
				}
				delete this._showResult
			}
			this._hideResult && (this._hideResult.opacity -= this._collisionMng.getStep(), this._hideResult.opacity <= 0 &&
				delete this._hideResult), this._drawLayers()
		}, ye.prototype._drawLayers = function() {
			this._glContext.clear();
			for (var t = 0; t < this._layers.length; t += 1) {
				var e = this._layers[t].getType();
				"Fill" === e ? this._drawFill(this._layers[t]) : "FillExtrusion" === e ? this._drawFillExtrusion(this._layers[t]) :
					"Symbol" === e ? this._drawSymbol(this._layers[t]) : "Line" === e ? this._drawLine(this._layers[t]) : "Track" ===
					e ? this._drawTrack(this._layers[t]) : "Circle" === e ? this._drawCircle(this._layers[t]) : "Picture" === e ?
					this._drawPicture(this._layers[t]) : "Model" === e ? this._drawModel(this._layers[t]) : "Heatmap" === e ? this._drawHeatmap(
						this._layers[t]) : "Connection" === e && this._drawConnection(this._layers[t])
			}
		}, ye.prototype._drawConnection = function(t) {
			this._glContext.use(t.getShaderName()), this._glContext.enableDepthTest(), this._glContext.enableAlpha(), this._gl
				.blendFunc(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA);
			var e = this._glContext.getActiveProgram();
			if (e) {
				this._initViewProjectionMatrix(e);
				var i = t.getGeometryRenderList(),
					o = e.getAttribLocation("a_position"),
					r = e.getAttribLocation("a_texCoord"),
					n = e.getAttribLocation("a_normal"),
					s = e.getUniformLocation("u_base"),
					a = e.getUniformLocation("u_opacity"),
					h = e.getUniformLocation("u_color"),
					l = e.getUniformLocation("u_onePixelToWorld"),
					u = e.getUniformLocation("u_useTexture"),
					_ = e.getUniformLocation("u_imgSize"),
					p = e.getUniformLocation("u_width");
				this._gl.uniform1f(l, this._camera.getOnePixelToWorld());
				var c = e.getUniformLocation("u_modelMatrix");
				this._gl.uniformMatrix4fv(c, !1, this._camera.normalMatrix);
				for (var f = t.getMultiLayout(), g = 0; g < i.length; g += 1) {
					var d = i[g],
						y = d.buffer,
						m = d.base,
						v = d.opacity,
						x = d.color,
						w = d.width,
						M = d.useTexture,
						T = d.imgSize;
					y.bind({
						a_position: o,
						a_normal: n,
						a_texCoord: r
					}), this._gl.uniform1f(s, m + f.base), this._gl.uniform1i(u, M ? 1 : 0), this._gl.uniform1f(p, w), this._gl.uniform2fv(
						_, T), this._gl.uniform1f(a, v * f.opacity), this._gl.uniform4fv(h, x), this._gl.drawArrays(this._gl.TRIANGLE_STRIP,
						0, y.verticesNum)
				}
			}
		}, ye.prototype._drawHeatmap = function(t) {
			this._glContext.use(t.getShaderName()), this._glContext.disableDepthTest(), this._glContext.enableAlpha(), this._gl
				.blendFunc(this._gl.SRC_ALPHA, this._gl.ONE);
			var e = t.getBuffer(),
				i = this._glContext.getActiveProgram();
			if (e && i) {
				this._initViewProjectionMatrix(i);
				var o = i.getUniformLocation("u_radius"),
					r = i.getAttribLocation("a_normal"),
					n = i.getUniformLocation("u_resolution");
				this._gl.uniform2fv(n, [this._camera.getWidth(), this._camera.getHeight()]);
				var s = i.getUniformLocation("u_position");
				e.bind(r), this._glContext.enableFrameBuffer();
				for (var a = t.getGeometryRenderList(), h = 0; h < a.length; h += 1) {
					var l = a[h],
						u = l.point,
						_ = l.radius;
					this._gl.uniform2fv(s, u), this._gl.uniform1f(o, _), this._gl.drawArrays(this._gl.TRIANGLE_FAN, 0, e.verticesNum)
				}
				this._gl.bindFramebuffer(this._gl.FRAMEBUFFER, null), this._drawHeatMapTexture(t)
			}
		}, ye.prototype._drawHeatMapTexture = function(t) {
			this._glContext.use("heatmapTexture"), this._glContext.enableAlpha(), this._gl.blendFunc(this._gl.SRC_ALPHA, this._gl
				.ONE_MINUS_SRC_ALPHA), this._glContext.disableDepthTest();
			var e = this._glContext.getActiveProgram();
			if (e) {
				var i = e.getAttribLocation("a_position"),
					o = e.getUniformLocation("u_resolution"),
					r = e.getUniformLocation("u_opacity"),
					n = t.getLayout().opacity,
					s = t.getMultiLayout();
				this._gl.uniform1f(r, n * s.opacity);
				var a = this._glContext.getViewRect(),
					h = a.width,
					l = a.height;
				this._gl.uniform2fv(o, [h, l]), this._glContext.initArrayBuffer(i, new Float32Array([-1, -1, -1, 1, 1, -1, 1, 1]),
					2), this._gl.drawArrays(this._gl.TRIANGLE_STRIP, 0, 4)
			}
		}, ye.prototype._drawModel = function(t) {
			this._glContext.use(t.getShaderName()), this._glContext.enableAlpha(), this._gl.blendFunc(this._gl.SRC_ALPHA, this
				._gl.ONE_MINUS_SRC_ALPHA), this._glContext.enableDepthTest();
			var e = this._glContext.getActiveProgram();
			if (e) {
				this._initViewProjectionMatrix(e), this._setLight(e);
				for (var i = e.getUniformLocation("u_color"), o = e.getUniformLocation("u_modelMatrix"), r = e.getUniformLocation(
						"u_opacity"), n = e.getUniformLocation("u_position"), s = e.getUniformLocation("u_base"), a = e.getAttribLocation(
						"a_position"), h = e.getAttribLocation("a_texCoord"), l = e.getAttribLocation("a_normal"), u = e.getUniformLocation(
						"u_useTexture"), _ = t.getMultiLayout(), p = t.getGeometryRenderList(), c = 0; c < p.length; c += 1)
					for (var f = 0; f < p[c].length; f += 1) {
						var g = p[c][f],
							d = g.color,
							y = g.matrix,
							m = g.buffer,
							v = g.useTexture,
							x = g.opacity,
							w = g.point,
							M = g.base;
						m.bind(a, h, l), this._gl.uniform4fv(i, d), this._gl.uniform2fv(n, w), this._gl.uniform1f(s, M + _.base), this._gl
							.uniform1i(u, v), this._gl.uniform1f(r, x * _.opacity), this._gl.uniformMatrix4fv(o, !1, y), this._gl.drawElements(
								this._gl.TRIANGLES, m.indicesNum, this._gl.UNSIGNED_SHORT, 0)
					}
			}
		}, ye.prototype._drawCircle = function(t) {
			this._glContext.use(t.getShaderName()), this._glContext.disableDepthTest(), this._glContext.disableAlpha();
			var e = t.getBuffer(),
				i = this._glContext.getActiveProgram();
			if (i && e) {
				this._initViewProjectionMatrix(i);
				var o = i.getUniformLocation("u_color"),
					r = i.getUniformLocation("u_radius"),
					n = i.getUniformLocation("u_base"),
					s = i.getUniformLocation("u_opacity"),
					a = i.getAttribLocation("a_normal"),
					h = i.getUniformLocation("u_resolution");
				this._gl.uniform2fv(h, [this._camera.getWidth(), this._camera.getHeight()]);
				var l = i.getUniformLocation("u_position"),
					u = t.getGeometryRenderList();
				e.bind(a);
				for (var _ = t.getMultiLayout(), p = 0; p < u.length; p += 1) {
					var c = u[p],
						f = c.base,
						g = c.radius,
						d = c.color,
						y = c.point,
						m = c.opacity;
					this._gl.uniform2fv(l, y), this._gl.uniform1f(s, m * _.opacity), this._gl.uniform1f(n, f + _.base), this._gl.uniform1f(
						r, g), this._gl.uniform4fv(o, d), this._gl.drawArrays(this._gl.TRIANGLE_FAN, 0, e.verticesNum)
				}
			}
		}, ye.prototype._drawTrack = function(t) {
			this._glContext.use(t.getShaderName()), this._glContext.disableDepthTest(), this._glContext.disableAlpha();
			var e = t.getGeometryRenderList(),
				i = this._glContext.getActiveProgram();
			if (i) {
				this._initViewProjectionMatrix(i);
				for (var o = i.getAttribLocation("a_position"), r = i.getUniformLocation("u_color"), n = i.getUniformLocation(
						"u_base"), s = i.getUniformLocation("u_opacity"), a = t.getMultiLayout(), h = 0; h < e.length; h += 1) {
					var l = e[h],
						u = l.buffer,
						_ = l.color,
						p = l.base,
						c = l.opacity;
					u.bind(o), this._gl.uniform4fv(r, _), this._gl.uniform1f(n, p + a.base), this._gl.uniform1f(s, c * a.opacity),
						this._gl.drawElements(this._gl.LINES, u.indicesNum, this._gl.UNSIGNED_SHORT, 0)
				}
			}
		}, ye.prototype._drawFill = function(t) {
			this._glContext.use(t.getShaderName()), this._glContext.disableDepthTest(), this._glContext.enableAlpha(), this._gl
				.blendFunc(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA);
			var e = t.getGeometryRenderList(),
				i = this._glContext.getActiveProgram();
			if (i) {
				this._initViewProjectionMatrix(i);
				for (var o = i.getAttribLocation("a_position"), r = i.getUniformLocation("u_color"), n = i.getUniformLocation(
						"u_base"), s = i.getUniformLocation("u_opacity"), a = t.getMultiLayout(), h = 0; h < e.length; h += 1) {
					var l = e[h],
						u = l.outlineColor,
						_ = l.fillColor,
						p = l.buffer,
						c = l.base,
						f = l.opacity;
					p.bindData(o), this._gl.uniform1f(n, c + a.base), this._gl.uniform1f(s, f * a.opacity), this._gl.uniform4fv(r, _),
						p.bindIndices("fill"), this._gl.drawElements(this._gl.TRIANGLES, p.fillIndicesNum, this._gl.UNSIGNED_SHORT, 0),
						this._gl.uniform4fv(r, u), p.bindIndices("outline"), this._gl.drawElements(this._gl.LINES, p.outlineIndicesNum,
							this._gl.UNSIGNED_SHORT, 0)
				}
			}
		}, ye.prototype._drawFillExtrusion = function(t) {
			this._glContext.use(t.getShaderName()), this._glContext.enableAlpha(), this._gl.blendFunc(this._gl.SRC_ALPHA, this
				._gl.ONE_MINUS_SRC_ALPHA), this._glContext.enableDepthTest();
			var e = this._glContext.getActiveProgram();
			if (e) {
				this._initViewProjectionMatrix(e), this._setLight(e);
				for (var i = e.getUniformLocation("u_color"), o = e.getUniformLocation("u_height"), r = e.getUniformLocation(
							"u_base"), n = e.getUniformLocation("u_opacity"), s = e.getAttribLocation("a_position"), a = e.getAttribLocation(
							"a_normal"), h = e.getUniformLocation("u_drawLine"), l = t.getGeometryRenderList(), u = t.getMultiLayout(), _ =
						this._camera.getZoom(), p = 0; p < l.length; p += 1) {
					var c = l[p],
						f = c.fillColor,
						g = c.base,
						d = c.buffer,
						y = c.height,
						m = c.outlineColor,
						v = c.opacity,
						x = c.zoomRange;
					this._gl.uniform1f(r, g + u.base), d.bindData(s, a), this._gl.uniform1f(o, y);
					var w = 1;
					if (x) {
						var M = 1 - (_ - x[0]) / (x[1] - x[0]);
						w = 1 < M ? 1 : 0 < M ? M : 0
					}
					this._gl.uniform1f(n, v * u.opacity * w), this._gl.uniform4fv(i, m), this._gl.uniform1i(h, 1), d.bindIndices(
						"outline"), this._gl.drawElements(this._gl.LINES, d.outlineIndicesNum, this._gl.UNSIGNED_SHORT, 0), this._gl.uniform4fv(
						i, f), this._gl.uniform1i(h, 0), d.bindIndices("fill"), this._gl.drawElements(this._gl.TRIANGLES, d.fillIndicesNum,
						this._gl.UNSIGNED_SHORT, 0)
				}
			}
		}, ye.prototype._drawSymbol = function(t) {
			this._glContext.use(t.getShaderName()), this._glContext.enableAlpha(), this._gl.blendFuncSeparate(this._gl.SRC_ALPHA,
				this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA), this._glContext.disableDepthTest();
			var e = this._glContext.getActiveProgram();
			if (e) {
				this._initViewProjectionMatrix(e);
				var i = e.getUniformLocation("u_modelMatrix");
				this._gl.uniformMatrix4fv(i, !1, this._camera.textureMatrix);
				var o = e.getUniformLocation("u_resolution");
				this._gl.uniform2fv(o, [this._camera.getWidth(), this._camera.getHeight()]);
				var r = e.getUniformLocation("u_position"),
					n = e.getUniformLocation("u_offset"),
					s = e.getUniformLocation("u_opacity"),
					a = e.getUniformLocation("u_sampler");
				this._gl.uniform1i(a, 0);
				for (var h = e.getUniformLocation("u_base"), l = e.getAttribLocation("a_position"), u = e.getAttribLocation(
						"a_texCoord"), _ = t.getGeometryRenderList(), p = t.getMultiLayout(), c = 0; c < _.length; c += 1)
					for (var f = 0; f < _[c].length; f += 1) {
						var g = _[c][f],
							d = g.buffer,
							y = g.point,
							m = g.offset,
							v = g.base,
							x = g.opacity;
						this._gl.uniform2fv(r, y), this._gl.uniform2fv(n, m), this._gl.uniform1f(h, v + p.base), this._gl.uniform1f(s,
							x * p.opacity), d.bind(l, u), this._gl.drawArrays(this._gl.TRIANGLE_STRIP, 0, d.verticesNum)
					}
				var w = {
					u_position: r,
					u_offset: n,
					u_base: h,
					u_opacity: s,
					a_position: l,
					a_texCoord: u
				};
				this._hideResult && this._drawCollisionResult(this._hideResult, t, w), this._showResult && this._drawCollisionResult(
					this._showResult, t, w), this._drawCollisionResult(this._normalResult, t, w)
			}
		}, ye.prototype._drawCollisionResult = function(t, e, i) {
			var o = t.data[e.id];
			if (o)
				for (var r = e.getCollisionRenderList(), n = e.getMultiLayout(), s = 0; s < o.length; s += 1)
					for (var a = r[o[s]] || [], h = 0; h < a.length; h += 1) {
						var l = a[h],
							u = l.buffer,
							_ = l.point,
							p = l.offset,
							c = l.base,
							f = l.opacity;
						this._gl.uniform2fv(i.u_position, _), this._gl.uniform2fv(i.u_offset, p), this._gl.uniform1f(i.u_base, c + n.base),
							this._gl.uniform1f(i.u_opacity, f * n.opacity * t.opacity), u.bind(i.a_position, i.a_texCoord), this._gl.drawArrays(
								this._gl.TRIANGLE_STRIP, 0, u.verticesNum)
					}
		}, ye.prototype._drawPicture = function(t) {
			var e = t.getGeometryRenderList();
			this._glContext.use(t.getShaderName()), this._glContext.enableAlpha(), this._gl.blendFunc(this._gl.SRC_ALPHA, this
				._gl.ONE_MINUS_SRC_ALPHA), this._glContext.enableDepthTest();
			var i = this._glContext.getActiveProgram();
			if (i) {
				this._initViewProjectionMatrix(i);
				var o = i.getAttribLocation("a_position"),
					r = i.getAttribLocation("a_texCoord"),
					n = i.getUniformLocation("u_opacity"),
					s = i.getUniformLocation("u_base"),
					a = i.getUniformLocation("u_rotate"),
					h = i.getUniformLocation("u_position"),
					l = i.getUniformLocation("u_sampler");
				this._gl.uniform1i(l, 0);
				for (var u = t.getMultiLayout(), _ = 0; _ < e.length; _ += 1) {
					var p = e[_],
						c = p.buffer,
						f = p.point,
						g = p.rotate,
						d = p.base,
						y = p.opacity;
					this._gl.uniform1f(s, d + u.base), this._gl.uniform1f(a, g), this._gl.uniform1f(n, y * u.opacity), this._gl.uniform2fv(
						h, f), c.bind(o, r), this._gl.drawArrays(this._gl.TRIANGLE_STRIP, 0, c.verticesNum)
				}
			}
		}, ye.prototype._drawLine = function(t) {
			var e = t.getGeometryRenderList();
			this._glContext.use(t.getShaderName()), this._glContext.enableDepthTest(), this._glContext.enableAlpha(), this._gl
				.blendFunc(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA);
			var i = this._glContext.getActiveProgram();
			if (i) {
				this._initViewProjectionMatrix(i);
				var o = i.getAttribLocation("a_position"),
					r = i.getAttribLocation("a_normal"),
					n = i.getAttribLocation("a_texCoord"),
					s = i.getAttribLocation("a_deviation"),
					a = i.getUniformLocation("u_color"),
					h = i.getUniformLocation("u_onePixelToWorld"),
					l = i.getUniformLocation("u_sampler");
				this._gl.uniform1i(l, 0);
				var u = i.getUniformLocation("u_lineWidth"),
					_ = i.getUniformLocation("u_imgSize"),
					p = i.getUniformLocation("u_opacity"),
					c = i.getUniformLocation("u_useTexture"),
					f = i.getUniformLocation("u_base");
				this._gl.uniform1f(h, this._camera.getOnePixelToWorld());
				for (var g = t.getMultiLayout(), d = 0; d < e.length; d += 1) {
					var y = e[d],
						m = y.lineColor,
						v = y.buffer,
						x = y.useTexture,
						w = y.imgSize,
						M = y.lineWidth,
						T = y.base,
						b = y.opacity;
					this._gl.uniform1i(c, x ? 1 : 0), this._gl.uniform1f(u, M), this._gl.uniform1f(f, T + g.base), this._gl.uniform1f(
						p, b * g.opacity), this._gl.uniform2fv(_, w), this._gl.uniform4fv(a, m), v.bind({
						a_position: o,
						a_normal: r,
						a_deviation: s,
						a_texCoord: n
					}), this._gl.drawElements(this._gl.TRIANGLES, v.indicesNum, this._gl.UNSIGNED_SHORT, 0)
				}
			}
		}, ye.prototype._setLight = function(t) {
			var e = t.getUniformLocation("u_normalMatrix");
			this._gl.uniformMatrix4fv(e, !1, this._camera.normalMatrix);
			var i = t.getUniformLocation("u_lightPos");
			this._gl.uniform3fv(i, this._lightPos);
			var o = t.getUniformLocation("u_ambientColor");
			this._gl.uniform3fv(o, this._ambientColor);
			var r = t.getUniformLocation("u_ambientMaterial");
			this._gl.uniform3fv(r, this._ambientMaterial);
			var n = t.getUniformLocation("u_diffuseColor");
			this._gl.uniform3fv(n, this._diffuseColor);
			var s = t.getUniformLocation("u_diffuseMaterial");
			this._gl.uniform3fv(s, this._diffuseMaterial)
		}, ye.prototype.destroy = function() {
			this._canvas.remove(), this._collisionMng.off("change", this._onCollisionChange), this._collisionMng.destroy(),
				this._bucketMng.destroy()
		}, ye.prototype.getCamera = function() {
			return this._camera
		}, ye.prototype.getTextureMng = function() {
			return this._textureMng
		}, ye.prototype.getGlyphMng = function() {
			return this._glyphMng
		}, ye.prototype.getCanvas = function() {
			return this._canvas
		}, ye.prototype.getLayers = function() {
			return this._layers
		}, ye.prototype.contains = function(t) {
			for (var e = 0; e < this._layers.length; e += 1)
				if (this._layers[e].id === t.id) return !0;
			return !1
		}, ye.prototype.getGl = function() {
			return this._gl
		}, ye.prototype._initViewProjectionMatrix = function(t) {
			var e = t.getUniformLocation("u_projectionMatrix"),
				i = t.getUniformLocation("u_viewMatrix");
			this._gl.uniformMatrix4fv(e, !1, this._camera.projectionMatrix), this._gl.uniformMatrix4fv(i, !1, this._camera.viewMatrix)
		}, ye.prototype._setupLight = function(t) {
			var e = t.lightPos,
				i = t.ambientColor,
				o = t.ambientMaterial,
				r = t.diffuseColor,
				n = t.diffuseMaterial;
			e && (this._lightPos = [e.x, e.y, e.z]), i && (this._ambientColor = Rt.parseColor(i)), o && (this._ambientMaterial =
				Rt.parseColor(o)), r && (this._diffuseColor = Rt.parseColor(r)), n && (this._diffuseMaterial = Rt.parseColor(n))
		}, ye);

	function ye(t, e) {
		var i = fe.call(this) || this;
		i._layers = [], i._lightPos = [1, -1, 1], i._ambientColor = [.8, .8, .8], i._ambientMaterial = [1, 1, 1], i._diffuseColor = [
			.1, .1, .1
		], i._diffuseMaterial = [1, 1, 1], i._bucketMng = new pe, i._normalResult = {
			data: {},
			opacity: 1
		}, i._renderQueue = [], u(["_frameRender", "_onCollisionChange"], i), i._container = t;
		var o = ge.getContainerRange(i._container),
			r = o.clientWidth,
			n = o.clientHeight;
		return i._canvas = ge.createCanvas(r, n, devicePixelRatio), i._container.appendChild(i._canvas), i._setupLight(e), i
			._gl = ge.getWebglRender(i._canvas, {
				antialias: !0,
				depth: !0,
				premultipliedAlpha: !0,
				preserveDrawingBuffer: !1,
				alpha: !0,
				failIfMajorPerformanceCaveat: !0
			}), i._gl.viewport(0, 0, i._canvas.width, i._canvas.height), i._camera = new F(r, n, {
				zoom: e.zoom,
				rotate: e.rotate,
				pitch: e.pitch
			}), i._collisionMng = new W(i._camera, {
				viewWidth: r,
				viewHeight: n,
				animateDuration: 300,
				collisionDuration: 600
			}), i._collisionMng.on("change", i._onCollisionChange), i._textureMng = new q(i._gl), i._glyphMng = new Q(i._gl, {
				fontWeight: e.fontWeight,
				fontFamily: e.localFontFamily,
				buffer: 3,
				textMaxWidth: e.maxTextSize,
				textSplit: e.textSplit
			}), i._glContext = new k(i._gl, {
				width: i._canvas.width,
				height: i._canvas.height
			}), i
	}
	var me, ve = {
			Fill: {
				order: 1,
				shaderName: "fill"
			},
			Line: {
				order: 2,
				shaderName: "line"
			},
			Connection: {
				order: 2,
				shaderName: "connection"
			},
			FillExtrusion: {
				order: 3,
				shaderName: "fillExtrusion"
			},
			Track: {
				order: 4,
				shaderName: "track"
			},
			Picture: {
				order: 4,
				shaderName: "picture"
			},
			Circle: {
				order: 5,
				shaderName: "circle"
			},
			Heatmap: {
				order: 5,
				shaderName: "heatmap"
			},
			Symbol: {
				order: 6,
				shaderName: "symbol"
			},
			Model: {
				order: 7,
				shaderName: "model"
			}
		},
		xe = (e(we, me = i), we.prototype._getTaskId = function() {
			return Lt.getId("task")
		}, we.prototype.on = function(t, e) {
			switch (me.prototype.on.call(this, t, e), t) {
				case "click":
					this._checkBind("click", this._onclick);
					break;
				case "mousedown":
					this._checkBind("mousedown", this._onmousedown);
					break;
				case "mousemove":
					this._checkBind("mousemove", this._onmousemove);
					break;
				case "mouseup":
					this._checkBind("mouseup", this._onmouseup)
			}
			return this
		}, we.prototype.off = function(t, e) {
			switch (me.prototype.off.call(this, t, e), t) {
				case "click":
					this._checkOff("click", this._onclick);
					break;
				case "mousedown":
					this._checkOff("mousedown", this._onmousedown);
					break;
				case "mousemove":
					this._checkOff("mousemove", this._onmousemove);
					break;
				case "mouseup":
					this._checkOff("mouseup", this._onmouseup)
			}
			return this
		}, we.prototype._checkBind = function(t, e) {
			if (!this._bindMap.has(t) && this._engine) {
				var i = this.getListeners(t);
				i && 0 !== i.length && (this._engine.on(t, e, {
					order: this._order,
					type: "top"
				}), this._bindMap.set(t, !0))
			}
		}, we.prototype._checkOff = function(t, e) {
			var i = this.getListeners(t);
			i && 0 !== i.length || (this._bindMap.delete(t), this._engine && this._engine.off(t, e))
		}, we.prototype.setIgnoreMultiFade = function(t) {
			this._ignoreMultiFade = t
		}, we.prototype.getIgnoreMultiFade = function() {
			return this._ignoreMultiFade
		}, we.prototype.setSync = function(t) {
			this._isSync = t
		}, we.prototype.getSync = function() {
			return this._isSync
		}, we.prototype.setAlwaysShow = function(t) {
			this._alwaysShow = t
		}, we.prototype.getAlwaysShow = function() {
			return this._alwaysShow
		}, we.prototype.getLayout = function() {
			return this._layout
		}, we.prototype.setMultiLayout = function(t) {
			this._multiLayout = m(m({}, this._multiLayout), t)
		}, we.prototype.getMultiLayout = function() {
			return this._multiLayout
		}, we.prototype.setFeatures = function(t) {
			return this._features = t, this._update(), this
		}, we.prototype.getFeatures = function() {
			return this._features
		}, we.prototype.resetLayout = function() {
			this._layout = m({}, this._lastLayout), this._update()
		}, we.prototype.setFloorId = function(t) {
			return this._floorId = t, this._groupId = t, this
		}, we.prototype.getFloorId = function() {
			return this._floorId
		}, we.prototype.getShaderName = function() {
			return this._shaderName
		}, we.prototype.getType = function() {
			return this._type
		}, we.prototype.setName = function(t) {
			return this._name = t, this
		}, we.prototype.getName = function() {
			return this._name
		}, we.prototype.getOrder = function() {
			return this._order
		}, we.prototype.setOrder = function(t) {
			this._order = t
		}, we.prototype.setGroupId = function(t) {
			this._groupId = t
		}, we.prototype.getGroupId = function() {
			return this._groupId
		}, we.prototype.onAdd = function(t) {
			var e = Boolean(this._engine);
			this._engine = t, this._checkBind("click", this._onclick), this._checkBind("mousedown", this._onmousedown), this._checkBind(
				"mousemove", this._onmousemove), this._checkBind("mouseup", this._onmouseup), e || (this._engine.getBucketMng().register(
				this._id, this._onBucketChange), this._update())
		}, we.prototype.unbind = function() {
			this._engine && (this._engine.off("click", this._onclick), this._engine.off("mousedown", this._onmousedown), this._engine
				.off("mousemove", this._onmousemove), this._engine.off("mouseup", this._onmouseup), this._bindMap.clear())
		}, we.prototype.onRemove = function() {
			this.clear(), this.unbind(), this._engine && (this._engine.getBucketMng().unregister(this._id), delete this._engine)
		}, we.prototype._onBucketChange = function(t) {
			this._updateRenderList(t), t.isRender && this._engine && this._engine.render()
		}, we.prototype._fireEvent = function(t, e) {
			var i = e.getWorld(),
				o = this.queryFeaturesByWorld(i.x, i.y);
			0 !== o.length && this.fire(t, {
				e: e,
				features: o
			})
		}, we.prototype._onclick = function(t) {
			t.isCancel() || this._fireEvent("click", t)
		}, we.prototype._onmousedown = function(t) {
			t.isCancel() || this._fireEvent("mousedown", t)
		}, we.prototype._onmousemove = function(t) {
			t.isCancel() || this._fireEvent("mousemove", t)
		}, we.prototype._onmouseup = function(t) {
			t.isCancel() || this._fireEvent("mouseup", t)
		}, Object.defineProperty(we.prototype, "id", {
			get: function() {
				return this._id
			},
			enumerable: !0,
			configurable: !0
		}), we);

	function we(t, e) {
		var i = me.call(this) || this;
		i._id = Lt.getId(), i._name = "layer", i._features = [], i._alwaysShow = !1, i._isSync = !1, i._ignoreMultiFade = !1,
			i._bindMap = new Map, u(["_onBucketChange", "_onclick", "_onmousedown", "_onmousemove", "_onmouseup"], i);
		var o = ve[t],
			r = o.shaderName,
			n = o.order;
		return i._shaderName = r, i._order = n, i._type = t, i._layout = m({}, e), i._lastLayout = m({}, e), i._multiLayout = {
			opacity: 1,
			base: 0
		}, i
	}
	var Me = (Te.prototype._initArrayBuffer = function(t, e) {
		this._gl.bindBuffer(this._gl.ARRAY_BUFFER, t), this._gl.bufferData(this._gl.ARRAY_BUFFER, new Float32Array(e),
			this._gl.STATIC_DRAW), this._gl.bindBuffer(this._gl.ARRAY_BUFFER, null)
	}, Te.prototype._initIndexBuffer = function(t, e) {
		this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, t);
		var i = new Uint16Array(e);
		this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER, i, this._gl.STATIC_DRAW), this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER,
			null)
	}, Te.prototype._vertexAttribPointer = function(t, e, i) {
		this._gl.bindBuffer(this._gl.ARRAY_BUFFER, e);
		var o = Float32Array.BYTES_PER_ELEMENT;
		this._gl.vertexAttribPointer(t, i, this._gl.FLOAT, !1, o * i, 0), this._gl.enableVertexAttribArray(t), this._gl.bindBuffer(
			this._gl.ARRAY_BUFFER, null)
	}, Te);

	function Te(t) {
		this._gl = t
	}
	var be, Ce = (e(Ee, be = Me), Ee.prototype.update = function(t) {
		var e = t.vertices,
			i = t.fillIndices,
			o = t.outlineIndices;
		this._initArrayBuffer(this._verticesBuffer, e), this.fillIndicesNum = i.length, this.outlineIndicesNum = o.length,
			this._initIndexBuffer(this._fillIndicesBuffer, i), this._initIndexBuffer(this._outlineIndicesBuffer, o)
	}, Ee.prototype.bindData = function(t) {
		this._vertexAttribPointer(t, this._verticesBuffer, 2)
	}, Ee.prototype.bindIndices = function(t) {
		"fill" === t ? this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, this._fillIndicesBuffer) : "outline" === t &&
			this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, this._outlineIndicesBuffer)
	}, Ee);

	function Ee(t) {
		var e = be.call(this, t) || this;
		return e.fillIndicesNum = 0, e.outlineIndicesNum = 0, e._verticesBuffer = e._gl.createBuffer(), e._fillIndicesBuffer =
			e._gl.createBuffer(), e._outlineIndicesBuffer = e._gl.createBuffer(), e
	}
	var Le = (Ie.prototype.getVector2 = function() {
		var t = this._end.x - this._start.x,
			e = this._end.y - this._start.y;
		return new Nt([t, e])
	}, Ie.prototype.getLength = function() {
		return this._start.distanceTo(this._end)
	}, Ie.prototype.getClosest = function(t) {
		var e = t.x,
			i = t.y,
			o = new S(e, i),
			r = this.getVector2(),
			n = r.x,
			s = r.y,
			a = this._start,
			h = a.x,
			l = a.y,
			u = this._end,
			_ = u.x,
			p = u.y;
		if (0 === this.getLength()) return {
			distance: o.distanceTo(this._start),
			coordinate: {
				x: h,
				y: l
			}
		};
		var c, f = (n * s * e - n * s * h + s * s * i + n * n * l) / (s * s + n * n);
		if (c = 0 === n ? (s * h + n * f - n * l) / s : (n * e - s * f + s * i) / n, this._checkIsInSegment(c, f)) return {
			distance: new S(c, f).distanceTo(o),
			coordinate: {
				x: c,
				y: f
			}
		};
		var g = o.distanceTo(this._start),
			d = o.distanceTo(this._end);
		return g < d ? {
			distance: g,
			coordinate: {
				x: h,
				y: l
			}
		} : {
			distance: d,
			coordinate: {
				x: _,
				y: p
			}
		}
	}, Ie.prototype.getStart = function() {
		return this._start
	}, Ie.prototype.getEnd = function() {
		return this._end
	}, Ie.prototype._checkIsInSegment = function(t, e) {
		var i = Math.max(this._start.x, this._end.x) + Ie.PRECISION,
			o = Math.min(this._start.x, this._end.x) - Ie.PRECISION,
			r = Math.max(this._start.y, this._end.y) + Ie.PRECISION,
			n = Math.min(this._start.y, this._end.y) - Ie.PRECISION;
		return o <= t && t <= i && n <= e && e <= r
	}, Ie.PRECISION = 1e-8, Ie);

	function Ie(t, e) {
		this._start = new S(t[0], t[1]), this._end = new S(e[0], e[1])
	}

	function Re(t, e) {
		for (var i = e[0], o = e[1], r = !1, n = 0; n < t.length; n += 1)
			for (var s = t[n], a = 0, h = s.length, l = h - 1; a < h; l = a, a++) {
				var u = s[a][0],
					_ = s[a][1],
					p = s[l][0],
					c = s[l][1];
				if (u === i && _ === o || p === i && c === o) return !0;
				if (_ < o && o <= c || o <= _ && c < o) {
					var f = u + (o - _) * (p - u) / (c - _);
					if (f === i) return !0;
					i < f && (r = !r)
				}
			}
		return r
	}

	function Se(t, e, i) {
		for (var o = [], r = 0; r < e.length; r += 1) {
			var n = e[r].geometry;
			if (Rt.getStyle(t, "visible", e[r].properties))
				if ("Polygon" === n.type) Re(n.coordinates, [i.x, i.y]) && o.push(e[r]);
				else if ("MultiPolygon" === n.type)
				for (var s = 0; s < n.coordinates.length; s += 1) {
					if (Re(n.coordinates[s], [i.x, i.y])) {
						o.push(e[r]);
						break
					}
				}
		}
		return o
	}

	function Pe(t, e, i, o) {
		for (var r = [], n = i.x, s = i.y, a = 0; a < e.length; a += 1) {
			var h = e[a],
				l = h.geometry,
				u = h.properties,
				_ = Rt.getStyle(t, "visible", u),
				p = (Rt.getStyle(t, "radius", u) || 5) * o;
			if (_)
				if ("Point" === l.type) {
					var c = l.coordinates,
						f = c[0],
						g = c[1];
					Math.sqrt(Math.pow(n - f, 2) + Math.pow(s - g, 2)) < p && r.push(e[a])
				} else if ("MultiPoint" === l.type)
				for (var d = 0; d < l.coordinates.length; d += 1) {
					var y = l.coordinates[d];
					f = y[0], g = y[1];
					if (Math.sqrt(Math.pow(n - f, 2) + Math.pow(s - g, 2)) < p) {
						r.push(e[a]);
						break
					}
				}
		}
		return r
	}

	function Fe(t, e) {
		for (var i = [t[0][0], t[0][1]], o = [t[1][0], t[1][1]], r = new Le(i, o).getClosest(e).distance, n = 1; n < t.length -
			1; n += 1) {
			var s = [t[n][0], t[n][1]],
				a = [t[n + 1][0], t[n + 1][1]],
				h = new Le(s, a).getClosest(e).distance;
			h < r && (r = h)
		}
		return r
	}

	function Ae(t, e, i, o) {
		for (var r = [], n = 0; n < e.length; n += 1) {
			var s = e[n],
				a = s.geometry,
				h = s.properties,
				l = Rt.getStyle(t, "visible", h),
				u = (Rt.getStyle(t, "lineWidth", h) || 10) / 2 * o;
			if (l)
				if ("LineString" === a.type) Fe(a.coordinates, i) < u && r.push(e[n]);
				else if ("MultiLineString" === a.type)
				for (var _ = 0; _ < a.coordinates.length; _ += 1) {
					if (Fe(a.coordinates[_], i) < u) {
						r.push(e[n]);
						break
					}
				}
		}
		return r
	}
	var Ve, Ne = (e(Be, Ve = xe), Be.prototype.clear = function() {
		this._features.length = 0, this._geometryRenderList.length = 0
	}, Be.prototype._updateRenderList = function(t) {
		if (this._engine) {
			this._geometryRenderList.length = 0;
			for (var e = t.info, i = 0; i < e.length; i += 1) {
				var o = new Ce(this._engine.getGl());
				o.update({
					fillIndices: e[i].fillIndices,
					outlineIndices: e[i].outlineIndices,
					vertices: e[i].vertices
				}), this._geometryRenderList.push({
					buffer: o,
					outlineColor: e[i].outlineColor,
					opacity: e[i].opacity,
					base: e[i].base,
					fillColor: e[i].fillColor
				})
			}
		}
	}, Be.prototype.setLayout = function(t) {
		this._layout = m(m({}, this._layout), t), 0 !== this._features.length && this._update()
	}, Be.prototype.queryFeaturesByWorld = function(t, e) {
		return Se(this._layout, this._features, {
			x: t,
			y: e
		})
	}, Be.prototype._update = function() {
		this._engine && this._engine.getBucketMng().update({
			type: "fill",
			id: this.id,
			layout: this._layout,
			features: this._features,
			offset: this._engine.getOffset(),
			taskId: this._getTaskId(),
			sync: this.getSync()
		})
	}, Be.prototype.getGeometryRenderList = function() {
		return this._geometryRenderList
	}, Be.DEFAULT_LAYOUT = {
		visible: !0,
		fillColor: "#666666",
		outlineColor: "#333333",
		enableOutline: !0,
		base: 0,
		opacity: 1
	}, Be);

	function Be(t) {
		var e = Ve.call(this, "Fill", m(m({}, Be.DEFAULT_LAYOUT), t)) || this;
		return e._geometryRenderList = [], e
	}
	var ke, Oe = (e(ze, ke = Me), ze.prototype.update = function(t) {
		var e = t.vertices,
			i = t.normals,
			o = t.fillIndices,
			r = t.outlineIndices;
		this._initArrayBuffer(this._verticesBuffer, e), this._initArrayBuffer(this._normalsBuffer, i), this.fillIndicesNum =
			o.length, this.outlineIndicesNum = r.length, this._initIndexBuffer(this._fillIndicesBuffer, o), this._initIndexBuffer(
				this._outlineIndicesBuffer, r)
	}, ze.prototype.bindData = function(t, e) {
		this._vertexAttribPointer(t, this._verticesBuffer, 2), this._vertexAttribPointer(e, this._normalsBuffer, 3)
	}, ze.prototype.bindIndices = function(t) {
		"fill" === t ? this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, this._fillIndicesBuffer) : "outline" === t &&
			this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, this._outlineIndicesBuffer)
	}, ze);

	function ze(t) {
		var e = ke.call(this, t) || this;
		return e.fillIndicesNum = 0, e.outlineIndicesNum = 0, e._verticesBuffer = e._gl.createBuffer(), e._normalsBuffer = e
			._gl.createBuffer(), e._fillIndicesBuffer = e._gl.createBuffer(), e._outlineIndicesBuffer = e._gl.createBuffer(), e
	}
	var De, Ue = (e(Ge, De = xe), Ge.prototype.clear = function() {
		this._features.length = 0, this._geometryRenderList.length = 0
	}, Ge.prototype.setLayout = function(t) {
		this._layout = m(m({}, this._layout), t), 0 !== this._features.length && this._update()
	}, Ge.prototype._updateRenderList = function(t) {
		if (this._engine) {
			this._geometryRenderList.length = 0;
			for (var e = t.info, i = 0; i < e.length; i += 1) {
				var o = new Oe(this._engine.getGl());
				o.update({
					vertices: e[i].vertices,
					normals: e[i].normals,
					fillIndices: e[i].fillIndices,
					outlineIndices: e[i].outlineIndices
				}), this._geometryRenderList.push({
					buffer: o,
					height: e[i].height,
					base: e[i].base,
					opacity: e[i].opacity,
					fillColor: e[i].fillColor,
					outlineColor: e[i].outlineColor,
					zoomRange: e[i].zoomRange
				})
			}
		}
	}, Ge.prototype.queryFeaturesByWorld = function(t, e) {
		return Se(this._layout, this._features, {
			x: t,
			y: e
		})
	}, Ge.prototype._update = function() {
		this._engine && this._engine.getBucketMng().update({
			type: "fillExtrusion",
			layout: this._layout,
			offset: this._engine.getOffset(),
			features: this._features,
			id: this.id,
			taskId: this._getTaskId(),
			sync: this.getSync()
		})
	}, Ge.prototype.getGeometryRenderList = function() {
		return this._geometryRenderList
	}, Ge.DEFAULT_LAYOUT = {
		visible: !0,
		fillColor: "#666666",
		outlineColor: "#333333",
		enableOutline: !0,
		base: 0,
		opacity: 1,
		height: 0
	}, Ge);

	function Ge(t) {
		var e = De.call(this, "FillExtrusion", m(m({}, Ge.DEFAULT_LAYOUT), t)) || this;
		return e._geometryRenderList = [], e
	}
	var We, Ze = (e(je, We = Me), je.prototype.setGlyphMng = function(t) {
		this._glyphMng = t
	}, je.prototype.update = function(t) {
		var e = t.texture,
			i = t.vertices,
			o = t.texCoords,
			r = t.textOptions;
		this.verticesNum = i.length / 2, this._texture = e, this._textOptions = r, this._initArrayBuffer(this._verticesBuffer,
			i), this._initArrayBuffer(this._texCoordBuffer, o)
	}, je.prototype.bind = function(t, e) {
		this._vertexAttribPointer(t, this._verticesBuffer, 2), this._vertexAttribPointer(e, this._texCoordBuffer, 2), this
			._texture ? this._gl.bindTexture(this._gl.TEXTURE_2D, this._texture) : this._glyphMng && this._textOptions && (
				this._texture = this._glyphMng.getTexture(this._textOptions), this._gl.bindTexture(this._gl.TEXTURE_2D, this._texture)
			)
	}, je);

	function je(t) {
		var e = We.call(this, t) || this;
		return e.verticesNum = 0, e._verticesBuffer = e._gl.createBuffer(), e._texCoordBuffer = e._gl.createBuffer(), e
	}
	var Ye, He = (e(qe, Ye = xe), qe.prototype._onCollisionChange = function(t) {
		var e = t.showResult,
			i = t.normalResult,
			o = e[this.id] || [],
			r = i[this.id] || [];
		this._collisionIndices = o.concat(r)
	}, qe.prototype._onBucketChange = function(t) {
		var e = this._collisionRenderList.length;
		Ye.prototype._onBucketChange.call(this, t);
		var i = this._collisionRenderList.length;
		t.isRender && (e !== i || 0 < i) && this._engine && this._engine.updateCollision()
	}, qe.prototype.clear = function() {
		this._features.length = 0, this._collisionList.length = 0, this._geometryRenderList.length = 0, this._collisionRenderList
			.length = 0
	}, qe.prototype.setLayout = function(t) {
		this._layout = m(m({}, this._layout), t), 0 !== this._features.length && this._update()
	}, qe.prototype.onAdd = function(t) {
		Ye.prototype.onAdd.call(this, t);
		var e = t.getCollisionMng();
		e.add(this.getCollisionData()), e.on("change", this._onCollisionChange)
	}, qe.prototype.unbind = function() {
		if (this._engine) {
			var t = this._engine.getCollisionMng();
			t.remove(this.getCollisionData()), t.off("change", this._onCollisionChange)
		}
		Ye.prototype.unbind.call(this)
	}, qe.prototype.getGeometryRenderList = function() {
		return this._geometryRenderList
	}, qe.prototype.getCollisionRenderList = function() {
		return this._collisionRenderList
	}, qe.prototype.getCollisionData = function() {
		return {
			data: this._collisionList,
			floorId: this.getGroupId(),
			id: this.id
		}
	}, qe.prototype.queryFeaturesByWorld = function(t, e) {
		if (!this._engine) return [];
		for (var i = this._engine.getCamera().worldToScreenCoordinate(t, e), o = [], r = new Set(this._collisionIndices),
				n = 0, s = 0; s < this._dataItemList.length; s += 1) {
			var a = this._dataItemList[s].properties,
				h = Rt.getStyle(this._layout, "visible", a),
				l = Rt.getStyle(this._layout, "collision", a);
			h && (l && !r.has(n) || this._checkDataItem(this._dataItemList[s], i) && o.push({
				type: this._dataItemList[s].type,
				geometry: this._dataItemList[s].geometry,
				properties: this._dataItemList[s].properties
			}), n += 1)
		}
		return o
	}, qe.prototype._checkDataItem = function(t, e) {
		if (!this._engine) return !1;
		var i = this._engine.getGlyphMng().getBaseSize(),
			o = t.textSize,
			r = t.iconSize,
			n = t.properties,
			s = Rt.getStyle(this._layout, "textOffset", n),
			a = Rt.getStyle(this._layout, "textAnchor", n),
			h = Rt.getStyle(this._layout, "textSize", n) / i,
			l = Rt.getStyle(this._layout, "iconAnchor", n),
			u = Rt.getStyle(this._layout, "iconOffset", n),
			_ = Rt.getStyle(this._layout, "iconSize", n);
		return o && this._check(t, e, a, s, o, h) || r && this._check(t, e, l, u, r, _)
	}, qe.prototype._check = function(t, e, i, o, r, n) {
		if (!this._engine) return !1;
		var s = [r[0] * n, r[1] * n],
			a = t.geometry;
		if ("Point" === a.type) {
			var h = p([(u = this._engine.getCamera().worldToScreenCoordinate(a.coordinates[0], a.coordinates[1])).x - o[0], u
				.y - o[1]
			], s[0], s[1], i);
			return qe.checkInBounds(e, h)
		}
		if ("MultiPoint" === a.type)
			for (var l = 0; l < a.coordinates.length; l += 1) {
				var u, _ = p([(u = this._engine.getCamera().worldToScreenCoordinate(a.coordinates[l][0], a.coordinates[l][1])).x -
					o[0], u.y - o[1]
				], s[0], s[1], i);
				if (qe.checkInBounds(e, _)) return !0
			}
		return !1
	}, qe.prototype._updateRenderList = function(t) {
		if (this._engine) {
			this._collisionList.length = 0, this._geometryRenderList.length = 0, this._collisionRenderList.length = 0;
			for (var e = this._engine.getTextureMng(), i = t.info, o = 0; o < i.length; o += 1) {
				for (var r = i[o], n = r.isCollision, s = r.collision, a = [], h = 0; h < i[o].data.length; h += 1) {
					var l = i[o].data[h],
						u = new Ze(this._engine.getGl()),
						_ = void 0;
					if (l.iconUrl) {
						var p = e.getTexture(l.iconUrl, qe.TEXTURE_PARAMS);
						p && (_ = p.texture)
					}
					u.update({
						vertices: l.vertices,
						texCoords: l.texCoords,
						texture: _,
						textOptions: l.textOptions
					}), u.setGlyphMng(this._engine.getGlyphMng());
					var c = {
						point: l.point,
						base: l.base,
						opacity: l.opacity,
						buffer: u,
						offset: l.offset
					};
					a.push(c)
				}
				n ? (this._collisionList.push(s), this._collisionRenderList.push(a)) : this._geometryRenderList.push(a)
			}
		}
	}, qe.prototype._update = function() {
		var e = this;
		if (this._engine) {
			for (var i = [], t = 0; t < this._features.length; t += 1) this._calcPoint(this._features[t], function(t) {
				i.push(t)
			});
			this._dataItemList = i;
			var o = this._engine.getBucketMng(),
				r = {
					type: "symbol",
					layout: this._layout,
					features: this._dataItemList,
					offset: this._engine.getOffset(),
					baseTextSize: this._engine.getGlyphMng().getBaseSize(),
					id: this.id,
					taskId: this._getTaskId(),
					sync: this.getSync()
				};
			0 === this._loadPromiseSet.size ? o.update(r) : new Promise(function(t) {
				Promise.all(e._loadPromiseSet).then(t).catch(t)
			}).then(function() {
				o.update(r)
			})
		}
	}, qe.prototype._calcPoint = function(c, f) {
		return v(this, void 0, void 0, function() {
			var e, i, o, r, n, s, a, h, l, u, _, p = this;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return this._engine ? (e = this._engine.getGlyphMng(), i = this._engine.getTextureMng(), (s = Rt.getStyle(
							this._layout, "iconImage", c.properties)) ? (a = i.getTexture(s, qe.TEXTURE_PARAMS)) ? [3, 2] : (h = i.loadTexture(
							s, qe.TEXTURE_PARAMS), this._loadPromiseSet.add(h), h.then(function() {
							return p._loadPromiseSet.delete(h)
						}), [4, h]) : [3, 3]) : [2];
					case 1:
						a = t.sent(), t.label = 2;
					case 2:
						o = [a.width, a.height], t.label = 3;
					case 3:
						return (l = Rt.getStyle(this._layout, "textField", c.properties)) && c.properties && void 0 !== c.properties[
							l] && null !== c.properties[l] && (u = c.properties[l].toString(), _ = e.getTextBound(u), r = [_.width,
							_.height
						], n = _.textArr), f(m(m({}, c), {
							iconSize: o,
							textArr: n,
							textSize: r
						})), [2]
				}
			})
		})
	}, qe.checkInBounds = function(t, e) {
		var i = e.leftBottom,
			o = e.rightTop;
		return i[0] <= t.x && t.x <= o[0] && i[1] <= t.y && t.y <= o[1]
	}, qe.DEFAULT_LAYOUT = {
		visible: !0,
		base: 0,
		opacity: 1,
		weight: 0,
		margin: 0,
		iconAnchor: "center",
		iconSize: 1,
		iconOffset: [0, 0],
		iconZHeight: 0,
		textColor: "#666666",
		textAnchor: "center",
		textSize: 16,
		textOffset: [0, 0],
		textZHeight: 0
	}, qe.TEXTURE_PARAMS = {
		xRepeat: !1,
		yRepeat: !1
	}, qe);

	function qe(t) {
		var e = Ye.call(this, "Symbol", m(m({}, qe.DEFAULT_LAYOUT), t)) || this;
		return e._dataItemList = [], e._geometryRenderList = [], e._collisionList = [], e._collisionRenderList = [], e._loadPromiseSet =
			new Set, e._collisionIndices = [], u(["_onCollisionChange", "_onBucketChange"], e), e
	}

	function Xe(t, e, i) {
		if (void 0 === e && (e = {}), void 0 === i && (i = "GET"), e.query) {
			var o = [];
			for (var r in e.query) o.push(r + "=" + encodeURIComponent(e.query[r]));
			t += (/\?/.test(t) ? "&" : "?") + o.join("&")
		}
		var n, s = new XMLHttpRequest;
		if (s.open(i.toUpperCase(), t, !0), e.json && (s.setRequestHeader("Content-Type", "application/json;charset=utf-8"),
				n = JSON.stringify(e.json)), e.form && (s.setRequestHeader("Content-Type",
				"application/x-www-form-urlencoded;charset=utf-8"), n = JSON.stringify(e.form)), e.body && (n = e.body), e.headers)
			for (var r in e.headers) s.setRequestHeader(r, e.headers[r]);
		return e.timeout && (s.timeout = e.timeout), e.responseType && (s.responseType = e.responseType), e.timeout && (s.timeout =
			e.timeout), s.send(n), new Promise(function(e, i) {
			s.onload = function() {
				var t = s.getResponseHeader("Content-Type") || "";
				4 === s.readyState && 200 === s.status ? /application\/json/.test(t) && "string" == typeof s.response ? e(JSON.parse(
					s.response)) : e(s.response) : i(s.response)
			}, s.onerror = function(t) {
				i(t)
			}, s.ontimeout = function() {
				i(new Error("timeout"))
			}, s.onabort = function() {
				i(new Error("abort"))
			}
		})
	}
	Promise || console.error("your browser is not support Promise");
	var Ke, Qe, Je = {
			get: function(t, e) {
				return void 0 === e && (e = {}), Xe(t, e, "GET")
			},
			post: function(t, e) {
				return void 0 === e && (e = {}), Xe(t, e, "POST")
			},
			del: function(t, e) {
				return void 0 === e && (e = {}), Xe(t, e, "DELETE")
			},
			put: function(t, e) {
				return void 0 === e && (e = {}), Xe(t, e, "PUT")
			}
		},
		$e = (ti.prototype._loadStyle = function(i) {
			return v(this, void 0, void 0, function() {
				var e;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return "string" != typeof i ? [3, 2] : [4, Je.get(i)];
						case 1:
							return e = t.sent(), this._style = "string" == typeof e ? JSON.parse(e) : e, [3, 3];
						case 2:
							this._style = i, t.label = 3;
						case 3:
							return this._parseStyle(), [2]
					}
				})
			})
		}, ti.prototype.loadStyle = function(t) {
			var e = this;
			return this._loadPromise = this._loadStyle(t), this._loadPromise.then(function() {
				return delete e._loadPromise
			}), this._loadPromise
		}, ti.prototype.updateStyle = function(i) {
			return v(this, void 0, void 0, function() {
				var e;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return e = this._style, [4, this._loadStyle(i)];
						case 1:
							return t.sent(), [2, ti.checkStyleDiff(e, this._style)]
					}
				})
			})
		}, ti.prototype.getOriginStyle = function() {
			return this._style && m({}, this._style)
		}, ti.prototype._parseStyle = function() {
			this._style && (this._styleLayout = {
				mapBackgroundColor: this._style.mapBackgroundColor,
				frame: this._style.frame,
				area: m(m({}, this._style.area.default), {
					keys: this._style.area.style.keys,
					values: this._parseValues(this._style.area.style.values)
				}),
				facility: m(m({}, this._style.facility.default), {
					keys: this._style.facility.style.keys,
					values: this._parseValues(this._style.facility.style.values)
				}),
				areaText: m(m({}, this._style.areaText.default), {
					keys: this._style.areaText.style.keys,
					values: this._parseValues(this._style.areaText.style.values)
				})
			}, this._style.extra && (this._styleLayout.extra = m(m({}, this._style.extra.default), {
				keys: this._style.extra.style.keys,
				values: this._parseValues(this._style.extra.style.values)
			})))
		}, ti.prototype.filterExtra = function(t) {
			if (!this._styleLayout || !this._styleLayout.extra || !t) return !1;
			var e = this._styleLayout.extra,
				i = e.keys,
				o = e.values;
			if (!i || !o) return !1;
			for (var r = 0; r < i.length; r += 1)
				if (void 0 !== o[t[i[r]]]) return !0;
			return !1
		}, ti.prototype._parseValues = function(t) {
			for (var e = {}, i = 0; i < t.length; i += 1)
				for (var o = t[i].key, r = 0; r < o.length; r += 1) {
					var n = m({}, t[i]);
					delete n.key, e[o[r]] = m(m({}, e[o[r]]), n)
				}
			return e
		}, ti.prototype.loaded = function() {
			return !this._loadPromise
		}, ti.prototype.getLoadPromise = function() {
			return this._loadPromise
		}, ti.prototype.getStyle = function(t) {
			if (this._styleLayout) return this._styleLayout[t]
		}, ti.checkStyleDiff = function(t, e) {
			if (!t) return ["frame", "area", "areaText", "facility", "extra"];
			var i = [];
			return n(t.frame, e.frame) || i.push("frame"), n(t.area, e.area) || i.push("area"), n(t.areaText, e.areaText) || i
				.push("areaText"), n(t.facility, e.facility) || i.push("facility"), n(t.extra, e.extra) || i.push("extra"), i
		}, ti);

	function ti() {}(Qe = Ke = Ke || {}).frame = "frame", Qe.area = "area", Qe.facility = "facility", Qe.areaText =
		"areaText", Qe.extra = "extra";
	var ei, ii = (e(oi, ei = i), oi.prototype.init = function(i, o) {
		return v(this, void 0, void 0, function() {
			var e;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return this._engine = new de(i, {
							zoom: this._options.zoom,
							rotate: this._options.rotate,
							pitch: this._options.pitch,
							lightPos: this._options.lightPos,
							ambientColor: this._options.ambientColor,
							ambientMaterial: this._options.ambientMaterial,
							diffuseColor: this._options.diffuseColor,
							diffuseMaterial: this._options.diffuseMaterial,
							localFontFamily: this._options.localFontFamily,
							fontWeight: this._options.fontWeight,
							maxTextSize: this._options.maxTextSize,
							textSplit: this._options.textSplit
						}), this._engine.getCamera().set({
							center: this._options.center
						}), [4, this._styleMng.loadStyle(o)];
					case 1:
						return t.sent(), (e = this._styleMng.getStyle("mapBackgroundColor")) && (i.style.background = e), [2]
				}
			})
		})
	}, oi.prototype._onResize = function(t) {
		t.isTrusted && this.resize()
	}, oi.prototype.resize = function() {
		this._engine && this._engine.resize(), this.fire("move")
	}, oi.prototype._onMoveEnd = function() {
		this._engine && this._engine.updateCollision()
	}, oi.prototype.getViewType = function() {
		return this._viewType
	}, oi.prototype._setupOffset = function(t) {
		if (this._engine) {
			var e = this._engine.getCamera(),
				i = t.center.coordinates,
				o = i[0],
				r = i[1],
				n = t.bounds;
			e.setMaxBounds(n && {
				topLeft: {
					x: n[0][0],
					y: n[1][1]
				},
				bottomRight: {
					x: n[1][0],
					y: n[0][1]
				}
			}), this._engine.setOffset(-o, -r), this._options.center || e.set({
				center: {
					x: o,
					y: r
				}
			})
		}
	}, oi.prototype._update = function(t) {
		var i = this;
		if (this._engine) {
			this._engine.clear();
			for (var e = new Map, o = 0; o < t.length; o += 1) e.set(t[o].flId, []);
			for (o = 0; o < this._outdoorLayers.length; o += 1) this._processLayer(this._outdoorLayers[o], e, !0);
			for (o = 0; o < this._layers.length; o += 1) this._checkIsNeedAdd(this._layers[o]) && this._processLayer(this._layers[
				o], e, !1);
			e.forEach(function(t) {
				for (var e = 0; e < t.length; e += 1) i._engine.addLayer(t[e])
			}), this._engine.sortLayer(), this._engine.render(), this._engine.updateCollision()
		}
	}, oi.prototype._processLayer = function(t, e, i) {
		var o = this.currentFloor;
		if ("multiple" === this._viewType) {
			o = i ? this._defaultFloor : t.getFloorId();
			var r = this.getFloorHeight(o);
			t.setMultiLayout({
				base: r,
				opacity: this._getLayerMultiOpacity(t)
			})
		}
		t.setGroupId(o);
		var n = e.get(o);
		n && n.push(t)
	}, oi.prototype.render = function() {
		this._engine && this._engine.render()
	}, oi.prototype._getLayerMultiOpacity = function(t, e) {
		var i = t.getFloorId(),
			o = new Set(e);
		return (i = oi.OUT_REG.test(i) ? this._defaultFloor : i) === this.currentFloor || o.has(i) || t.getIgnoreMultiFade() ?
			1 : this._options.multiFadeOpacity
	}, oi.prototype._drawPlanarGraphLayer = function(t, e) {
		if (!this._hasDrawFloorId.has(t)) {
			var i = e.frame,
				o = e.area,
				r = e.facility,
				n = e.shop;
			this._drawFrame(i, t);
			var s = this._drawArea(o.concat(n), t),
				a = s.text,
				h = s.extra;
			this._drawAreaText(a, t), this._drawExtra(h, t), this._drawFacility(r, t), this._hasDrawFloorId.add(t)
		}
	}, oi.prototype._drawFrame = function(t, e) {
		if (this._styleMng) {
			var i, o = this._styleMng.getStyle("frame");
			o && ((i = 0 === o.height ? new Ne(o) : new Ue(o)).setFeatures(t).setFloorId(e).setName(Ke.frame), this._layers.push(
				i), oi.OUT_REG.test(e) ? this._outdoorLayers.push(i) : this._layers.push(i))
		}
	}, oi.prototype._drawArea = function(t, i) {
		var o = this;
		if (!this._styleMng) return {
			text: [],
			extra: []
		};
		var r = this._styleMng.getStyle("area");
		if (!r) return {
			text: [],
			extra: []
		};
		for (var e = [], n = [], s = [], a = [], h = 0; h < t.length; h += 1) {
			var l = t[h].properties;
			0 === Rt.getStyle(r, "height", l) ? e.push(t[h]) : n.push(t[h]);
			var u = l && (l.labelpoint || l.center);
			u && s.push(_(u, l)), this._styleMng.filterExtra(l) && a.push(t[h])
		}
		return 0 !== e.length && g(e, oi.MAX_STEP, function(t) {
			var e = new Ne(r);
			e.setFeatures(t).setName(Ke.area).setFloorId(i), oi.OUT_REG.test(i) ? o._outdoorLayers.push(e) : o._layers.push(
				e)
		}), 0 !== n.length && g(n, oi.MAX_STEP, function(t) {
			var e = new Ue(r);
			e.setFeatures(t).setName(Ke.area).setFloorId(i), oi.OUT_REG.test(i) ? o._outdoorLayers.push(e) : o._layers.push(
				e)
		}), {
			text: s,
			extra: a
		}
	}, oi.prototype._drawAreaText = function(t, e) {
		if (this._styleMng && 0 !== t.length) {
			var i = this._styleMng.getStyle("areaText");
			if (i) {
				var o = new He(i);
				o.setFeatures(t).setName(Ke.areaText).setFloorId(e), oi.OUT_REG.test(e) ? this._outdoorLayers.push(o) : this._layers
					.push(o)
			}
		}
	}, oi.prototype._drawFacility = function(t, e) {
		if (this._styleMng && 0 !== t.length) {
			var i = this._styleMng.getStyle("facility");
			if (i) {
				var o = new He(i);
				o.setFeatures(t).setName(Ke.facility).setFloorId(e), oi.OUT_REG.test(e) ? this._outdoorLayers.push(o) : this._layers
					.push(o)
			}
		}
	}, oi.prototype._drawExtra = function(t, e) {
		if (this._styleMng && 0 !== t.length) {
			var i = this._styleMng.getStyle("extra");
			if (i) {
				var o = new Ue(i);
				o.setFeatures(t).setName(Ke.extra).setFloorId(e), o.setOrder(3.5), oi.OUT_REG.test(e) ? this._outdoorLayers.push(
					o) : this._layers.push(o)
			}
		}
	}, oi.prototype.jumpTo = function(t) {
		if (void 0 === t && (t = {}), this._engine) {
			var e = this._engine.getCamera(),
				i = t.center,
				o = t.zoom,
				r = t.rotate,
				n = t.pitch,
				s = t.offset,
				a = void 0 === s ? [0, 0] : s,
				h = {};
			"number" == typeof o && 0 < o && (h.zoom = E(o, this._options.minZoom, this._options.maxZoom)), "number" ==
				typeof r && (h.rotate = r), "number" == typeof n && (h.pitch = n);
			var l = e.centerPoint.add(new S(a[0], a[1])),
				u = e.screenToWorldCoordinate(l.x, l.y),
				_ = i ? new S(i.x, i.y) : u.clone();
			e.set(h), e.setCenterAtPoint(_, l), this._engine.render(), this._fireEvent(t, "Start"), this._fireEvent(t, ""),
				this._fireEvent(t, "End")
		}
	}, oi.prototype._fireEvent = function(t, e) {
		var i = t.zoom,
			o = t.rotate,
			r = t.pitch;
		this.fire("move" + e), "number" == typeof i && 0 < i && this.fire("zoom" + e), "number" == typeof o && this.fire(
			"rotate" + e), "number" == typeof r && this.fire("pitch" + e)
	}, oi.prototype.setMaxZoom = function(t) {
		if (t <= this._options.minZoom) console.warn("maxZoom 需要大于 minZoom ");
		else {
			this._options.maxZoom = t;
			var e = this.getZoom();
			"number" == typeof e && t < e && this.jumpTo({
				zoom: t
			})
		}
	}, oi.prototype.setMinZoom = function(t) {
		if (this._options.maxZoom <= t) console.warn("minZoom 需要小于 maxZoom");
		else {
			this._options.minZoom = t;
			var e = this.getZoom();
			"number" == typeof e && e < t && this.jumpTo({
				zoom: t
			})
		}
	}, oi.prototype.getMaxZoom = function() {
		return this._options.maxZoom
	}, oi.prototype.getMinZoom = function() {
		return this._options.minZoom
	}, oi.prototype.getZoom = function() {
		return this._engine && this._engine.getCamera().getZoom()
	}, oi.prototype.setZoom = function(t) {
		this.jumpTo({
			zoom: t
		})
	}, oi.prototype.zoomIn = function() {
		if (this._engine) {
			var t = E(this._engine.getCamera().getZoom() + 1, this._options.minZoom, this._options.maxZoom);
			this.easeTo({
				zoom: t,
				duration: 550
			})
		}
	}, oi.prototype.zoomOut = function() {
		if (this._engine) {
			var t = E(this._engine.getCamera().getZoom() - 1, this._options.minZoom, this._options.maxZoom);
			this.easeTo({
				zoom: t,
				duration: 550
			})
		}
	}, oi.prototype.easeTo = function(n) {
		var s = this;
		if (void 0 === n && (n = {}), this._engine) {
			var a = this._engine.getCamera(),
				h = a.getZoom(),
				l = a.getRotate(),
				u = a.getPitch();
			this._animator && this._animator.stop();
			var t = n.center,
				e = n.zoom,
				_ = void 0 === e ? h : e,
				i = n.rotate,
				o = void 0 === i ? l : i,
				r = n.pitch,
				p = void 0 === r ? u : r,
				c = n.offset,
				f = void 0 === c ? [0, 0] : c,
				g = n.duration,
				d = void 0 === g ? 500 : g,
				y = n.easing,
				m = void 0 === y ? "easeOutCirc" : y;
			_ = E(_, this._options.minZoom, this._options.maxZoom);
			var v = a.centerPoint.add(new S(f[0], f[1])),
				x = a.screenToWorldCoordinate(v.x, v.y),
				w = t ? new S(t.x, t.y) : x.clone(),
				M = x.clone(),
				T = w.clone().subtract(M);
			this._fireEvent(n, "Start"), this._animator = (new L).ofNumber(0, 1, d), C[m] && this._animator.easing(m);
			var b = F.normalizeRotate(o, l);
			this._animator.on("update", function(t) {
				if (s._engine) {
					var e = t.num / 1,
						i = {
							zoom: h + (_ - h) * e,
							rotate: l + (b - l) * e,
							pitch: u + (p - u) * e
						};
					a.set(i);
					var o = T.clone().multiply(e),
						r = M.clone().add(o);
					a.setCenterAtPoint(r, v), s._engine.render(), s._engine.updateCollision(!1), s._fireEvent(n, "")
				}
			}).on("complete", function() {
				delete s._animator, s._fireEvent(n, "End"), n.complete && n.complete()
			}).on("stop", function() {
				n.complete && n.complete()
			}).start()
		}
	}, oi.prototype.fitBounds = function(t, e) {
		if (void 0 === e && (e = 0), this._engine) {
			var i = t.topLeft,
				o = t.bottomRight;
			if (i && o) {
				var r, n = new S(i.x, i.y),
					s = new S(o.x, o.y),
					a = this._engine.getCamera(),
					h = {
						x: (n.x + s.x) / 2,
						y: (n.y + s.y) / 2
					},
					l = a.project(n),
					u = a.project(s),
					_ = new S(Math.max(l.x, u.x), Math.max(l.y, u.y)),
					p = new S(Math.min(l.x, u.x), Math.min(l.y, u.y)),
					c = _.clone().subtract(p),
					f = (a.getWidth() - 2 * e) / c.x,
					g = (a.getHeight() - 2 * e) / c.y;
				(f < 0 || g < 0) && (r = a.getZoom());
				var d = this._options,
					y = d.minZoom,
					m = d.maxZoom,
					v = Math.pow(2, a.getZoom());
				r = E(Math.log2(v * Math.min(f, g)), y, m), this.easeTo({
					center: h,
					zoom: r,
					rotate: 0
				})
			}
		}
	}, oi.prototype.stop = function() {
		this._animator && this._animator.stop()
	}, oi.prototype.getCenter = function() {
		return this._engine && this._engine.getCamera().getCenter()
	}, oi.prototype.setCenter = function(t) {
		this.jumpTo({
			center: t
		})
	}, oi.prototype.getRotate = function() {
		return this._engine && this._engine.getCamera().getRotate()
	}, oi.prototype.setRotate = function(t) {
		this.jumpTo({
			rotate: t
		})
	}, oi.prototype.getPitch = function() {
		return this._engine && this._engine.getCamera().getPitch()
	}, oi.prototype.setPitch = function(t) {
		this.jumpTo({
			pitch: t
		})
	}, oi.prototype.addLayers = function(t) {
		for (var e = 0; e < t.length; e += 1) this.hasLayer(t[e]) || (this._addLayer(t[e]), this._checkIsNeedAdd(t[e]) &&
			this._engine && this._engine.addLayer(t[e]));
		this._engine && this._engine.sortLayer()
	}, oi.prototype.addLayer = function(t) {
		this.hasLayer(t) || (this._addLayer(t), this._checkIsNeedAdd(t) && this._engine && (this._engine.addLayer(t), this
			._engine.sortLayer()))
	}, oi.prototype._addLayer = function(t) {
		this._layers.push(t);
		var e = t.getFloorId();
		if (e && "multiple" === this._viewType) {
			var i = this.getFloorHeight(e);
			t.setMultiLayout({
				base: i,
				opacity: this._getLayerMultiOpacity(t)
			})
		}
	}, oi.prototype.removeLayers = function(t) {
		for (var e = 0; e < t.length; e += 1) this._removeLayer(t[e]);
		this._engine && this._engine.updateCollision()
	}, oi.prototype.removeLayer = function(t) {
		var e = "Symbol" === t.getType() && 0 < t.getCollisionRenderList().length;
		this._removeLayer(t), this._engine && (this._engine.render(), e && this._engine.updateCollision())
	}, oi.prototype._removeLayer = function(e) {
		var t = this._layers.findIndex(function(t) {
			return t.id === e.id
		}); - 1 !== t && this._layers.splice(t, 1), this._engine && this._engine.removeLayer(e)
	}, oi.prototype.hasLayer = function(t) {
		for (var e = 0; e < this._layers.length; e += 1)
			if (this._layers[e].id === t.id) return !0;
		return !1
	}, oi.prototype.updateLayer = function(t) {
		var e = t.getFloorId();
		if (this._engine && e) {
			var i = this._engine.contains(t);
			if ("multiple" === this._viewType) {
				var o = this.getFloorHeight(e);
				t.setMultiLayout({
					base: o,
					opacity: this._getLayerMultiOpacity(t)
				})
			}
			var r = !1;
			this._checkIsNeedAdd(t) ? i || (this._engine.addLayer(t), this._engine.sortLayer(), r = !0) : i && (this._engine.removeLayer(
				t, !1), r = !0), r && (this._engine.render(), "Symbol" === t.getType() && 0 < t.getCollisionRenderList().length &&
				this._engine.updateCollision())
		}
	}, oi.prototype._updatePlanarGraphOpacity = function(t) {
		for (var e = this._layers.concat(this._outdoorLayers), i = 0; i < e.length; i += 1) e[i].setMultiLayout({
			opacity: this._getLayerMultiOpacity(e[i], t)
		})
	}, oi.prototype._checkIsNeedAdd = function(t) {
		return !!this.currentFloor && (t.getFloorId() === this.currentFloor || "multiple" === this._viewType || t.getAlwaysShow())
	}, oi.prototype.screenToWorldCoordinate = function(t, e) {
		return this._engine ? this._engine.getCamera().screenToWorldCoordinate(t, e) : new S(0, 0)
	}, oi.prototype.worldToScreenCoordinate = function(t, e) {
		return this._engine ? this._engine.getCamera().worldToScreenCoordinate(t, e) : new S(0, 0)
	}, oi.prototype.getEngine = function() {
		return this._engine
	}, oi.prototype.getCamera = function() {
		return this._engine && this._engine.getCamera()
	}, oi.isSelf = function(t) {
		return Boolean(Ke[t])
	}, oi.MAX_STEP = 800, oi.OUT_REG = /F00$/, oi);

	function oi(t) {
		var e = ei.call(this) || this;
		return e._layers = [], e._outdoorLayers = [], e._styleMng = new $e, e._hasDrawFloorId = new Set, u(["_onResize",
			"_onMoveEnd"
		], e), e._options = t, e._viewType = e._options.viewType, e._defaultFloor = e._options.defaultFloor, e.on("moveEnd",
			e._onMoveEnd), window.addEventListener("resize", e._onResize), e
	}
	var ri = (ni.prototype._startFrameUpdate = function() {
		this._timer || this._frameUpdate()
	}, ni.prototype._stopFrameUpdate = function(t) {
		this._timer && (cancelAnimationFrame(this._timer), this._state = "pending"), this._isCanMove = !1
	}, Object.defineProperty(ni.prototype, "animator", {
		get: function() {
			return this._mapView.gestureManager.getAnimator()
		},
		set: function(t) {
			this._mapView.gestureManager.setAnimator(t)
		},
		enumerable: !0,
		configurable: !0
	}), ni.prototype._initInertial = function() {
		for (var t = Date.now(), e = 0, i = this._inertias.length - 1; 0 <= i; i -= 1)
			if (160 < t - this._inertias[i][0]) {
				e = i;
				break
			} this._inertias = this._inertias.slice(e + 1)
	}, ni);

	function ni(t) {
		this._state = "pending", this._isCanMove = !1, this._inertias = [], this._mapView = t
	}

	function si(t, e) {
		if (0 !== t && 0 !== e) {
			var i = t < 0 ? -1 : 1,
				o = Math.abs(t * (.25 / e));
			180 < o && (o = 180);
			var r = o / 180;
			return {
				duration: r,
				offset: i * o * (r / 2)
			}
		}
	}
	var ai, hi = (e(li, ai = ri), li.prototype.enable = function() {
		this._state = "enable"
	}, li.prototype.disable = function() {
		this._state = "disable"
	}, li.prototype.onMousedown = function(t) {
		1 === t.which && "disable" !== this._state && this._start(t)
	}, li.prototype.onMousemove = function(t) {
		1 === t.which && "disable" !== this._state && this._isCanMove && this._onMove(t)
	}, li.prototype.onMouseup = function(t) {
		1 === t.which && this._stopFrameUpdate(t)
	}, li.prototype.onMouseleave = function(t) {
		1 === t.which && this._stopFrameUpdate(t)
	}, li.prototype.onTouchstart = function(t) {
		if (!(1 < t.touches.length || "disable" === this._state)) {
			var e = t.touches[0];
			this._start(e)
		}
	}, li.prototype._start = function(t) {
		this._state = "pending", this._isCanMove = !0, this._lastPos = new S(t.clientX, t.clientY), this._inertias = [
			[Date.now(), this._lastPos]
		], this.animator && (this.animator.stop(), this.animator = void 0)
	}, li.prototype.onTouchmove = function(t) {
		1 < t.touches.length || !this._isCanMove || this._onMove(t.touches[0])
	}, li.prototype.onTouchend = function(t) {
		this._stopFrameUpdate(t)
	}, li.prototype._onMove = function(t) {
		var e = this._mapView.getEngine();
		this._lastPos && e && ("pending" === this._state && (this._state = "active", this._startFrameUpdate(), this._mapView
				.fire("moveStart", t), this._mapView.fire("dragStart", t), this._mapView.fire("gestureStart")), this._curPos =
			new S(t.clientX, t.clientY), this._inertias.push([Date.now(), this._curPos]))
	}, li.prototype._frameUpdate = function() {
		var t = this._mapView.getEngine();
		if (t && this._lastPos && this._curPos) {
			var e = t.getCamera();
			if ("multiple" === this._mapView.getViewType()) {
				var i = this._curPos.clone().subtract(this._lastPos);
				i.set(i.x, -1 * i.y), i.rotate(-e.getRotate() / 180 * Math.PI), i.multiply(e.getOnePixelToWorld()), e.set({
					center: e.getCenter().subtract(i)
				})
			} else {
				var o = e.screenToWorldCoordinate(this._lastPos.x, this._lastPos.y);
				e.setCenterAtPoint(o, this._curPos)
			}
			this._lastPos = this._curPos, t.render(), t.updateCollision(!1)
		}
		this._mapView.fire("move"), this._mapView.fire("drag"), this._mapView.fire("gesture"), this._timer =
			requestAnimationFrame(this._frameUpdate)
	}, li.prototype._stopFrameUpdate = function(t) {
		ai.prototype._stopFrameUpdate.call(this, t), this._timer && (delete this._timer, this._inertialEnd(t)), delete this
			._lastPos, delete this._curPos
	}, li.prototype._inertialEnd = function(t) {
		if (this._mapView.fire("dragEnd", t), this._initInertial(), this._inertias.length < 2) return this._mapView.fire(
			"moveEnd", t), void this._mapView.fire("gestureEnd", t);
		var e = this._inertias[this._inertias.length - 1],
			i = this._inertias[0],
			o = function(t, e) {
				if (0 !== t.getLength() && 0 !== e) {
					var i = t.multiply(.3 / e),
						o = i.getLength(),
						r = o;
					1400 < r && (r = 1400, i.multiply(r / o));
					var n = r / 750;
					return {
						duration: n,
						offset: i.multiply(n / 2)
					}
				}
			}(e[1].clone().subtract(i[1]), (e[0] - i[0]) / 1e3);
		if (!o) return this._mapView.fire("moveEnd", t), void this._mapView.fire("gestureEnd", t);
		var r = o.offset,
			n = o.duration;
		this._moveInertia(r, 1e3 * n, t), this._inertias = []
	}, li.prototype._moveInertia = function(t, e, o) {
		var r = this,
			n = this._mapView.getEngine();
		if (n) {
			var s = n.getCamera(),
				a = s.centerPoint.add(t),
				i = s.screenToWorldCoordinate(a.x, a.y),
				h = s.getCenter(),
				l = i.clone(),
				u = h.clone().subtract(l),
				_ = (new L).ofNumber(0, 1, e);
			(this.animator = _).easing("easeOutCirc"), _.on("update", function(t) {
				var e = u.clone().multiply(t.num),
					i = l.clone().add(e);
				s.setCenterAtPoint(i, a), n.render(), n.updateCollision(!1), r._mapView.fire("move", o)
			}).on("complete", function() {
				r._mapView.fire("moveEnd", o), r._mapView.fire("gestureEnd", o), r.animator = void 0
			}).on("stop", function() {
				r._mapView.fire("moveEnd", o), r._mapView.fire("gestureEnd", o)
			}).start()
		}
	}, li);

	function li(t) {
		var e = ai.call(this, t) || this;
		return u(["_frameUpdate"], e), e
	}
	var ui, _i = (e(pi, ui = ri), pi.prototype.enableRotate = function() {
		this._rotateEnable = !0
	}, pi.prototype.disableRotate = function() {
		this._rotateEnable = !1
	}, pi.prototype.enablePitch = function() {
		this._pitchEnable = !0
	}, pi.prototype.disablePitch = function() {
		this._pitchEnable = !1
	}, pi.prototype._isEnable = function() {
		return this._rotateEnable || this._pitchEnable
	}, pi.prototype.onMousedown = function(t) {
		3 === t.which && this._isEnable() && (this._isCanMove = !0, this._lastPos = new S(t.clientX, t.clientY), this._inertias = [
			[Date.now(), this._mapView.getRotate()]
		], this.animator && (this.animator.stop(), this.animator = void 0))
	}, pi.prototype.onMousemove = function(t) {
		3 === t.which && this._isEnable() && this._isCanMove && this._onMove(t)
	}, pi.prototype.onMouseup = function(t) {
		3 === t.which && this._stopFrameUpdate(t)
	}, pi.prototype.onMouseleave = function(t) {
		3 === t.which && this._stopFrameUpdate(t)
	}, pi.prototype._onMove = function(t) {
		"pending" === this._state && (this._state = "active", this._startFrameUpdate(), this._mapView.fire("moveStart", t),
			this._rotateEnable && this._mapView.fire("rotateStart", t), this._pitchEnable && this._mapView.fire("pitchStart",
				t), this._mapView.fire("gestureStart")), this._curPos = new S(t.clientX, t.clientY)
	}, pi.prototype._frameUpdate = function() {
		var t = this._mapView.getEngine();
		if (t && this._lastPos && this._curPos) {
			var e = t.getCamera(),
				i = this._curPos.x - this._lastPos.x,
				o = e.getRotate();
			o += i / 3;
			var r = e.getPitch();
			r -= (this._curPos.y - this._lastPos.y) / 3;
			var n = {};
			if (this._pitchEnable && (n.pitch = r), this._rotateEnable) {
				n.rotate = o;
				var s = this._inertias[this._inertias.length - 1];
				this._inertias.push([Date.now(), F.normalizeRotate(o, s[1])])
			}
			e.set(n), this._lastPos = this._curPos, t.render(), t.updateCollision(!1)
		}
		this._mapView.fire("move"), this._rotateEnable && this._mapView.fire("rotate"), this._pitchEnable && this._mapView
			.fire("pitch"), this._mapView.fire("gesture"), this._timer = requestAnimationFrame(this._frameUpdate)
	}, pi.prototype._stopFrameUpdate = function(t) {
		ui.prototype._stopFrameUpdate.call(this, t), this._timer && (delete this._timer, this._inertialEnd(t)), delete this
			._lastPos, delete this._curPos
	}, pi.prototype._inertialEnd = function(t) {
		if (this._initInertial(), this._inertias.length < 2) this._fireEnd(t);
		else {
			var e = this._inertias[0],
				i = this._inertias[this._inertias.length - 1],
				o = (i[0] - e[0]) / 1e3,
				r = si(i[1] - e[1], o);
			if (!r || Math.abs(r.offset) < 2) this._fireEnd(t);
			else {
				var n = r.offset,
					s = r.duration;
				this._rotateInertia(n, 1e3 * s, t), this._inertias = []
			}
		}
	}, pi.prototype._rotateInertia = function(i, t, e) {
		var o = this,
			r = this._mapView.getEngine();
		if (r) {
			var n = r.getCamera(),
				s = n.getRotate(),
				a = (new L).ofNumber(0, 1, t);
			(this.animator = a).easing("easeOutCirc"), a.on("update", function(t) {
				var e = i * t.num + s;
				n.set({
					rotate: e
				}), r.render(), r.updateCollision(!1), o._mapView.fire("move", t), o._mapView.fire("rotate", t)
			}).on("complete", function() {
				o._fireEnd(e), o.animator = void 0
			}).on("stop", function() {
				o._fireEnd(e)
			}).start()
		}
	}, pi.prototype._fireEnd = function(t) {
		this._mapView.fire("moveEnd", t), this._rotateEnable && this._mapView.fire("rotateEnd"), this._pitchEnable && this
			._mapView.fire("pitchEnd"), this._mapView.fire("gestureEnd")
	}, pi);

	function pi(t) {
		var e = ui.call(this, t) || this;
		return e._rotateEnable = !0, e._pitchEnable = !0, u(["_frameUpdate"], e), e
	}
	var ci, fi = (e(gi, ci = ri), gi.prototype.enableZoom = function() {
		this._zoomEnable = !0
	}, gi.prototype.disableZoom = function() {
		this._zoomEnable = !1
	}, gi.prototype.enableRotate = function() {
		this._rotateEnable = !0
	}, gi.prototype.disableRotate = function() {
		this._rotateEnable = !1
	}, gi.prototype.enablePitch = function() {
		this._pitchEnable = !0
	}, gi.prototype.disablePitch = function() {
		this._pitchEnable = !1
	}, gi.prototype.onTouchstart = function(t) {
		if (!(t.touches.length < 2) && this._isEnable()) {
			this._isCanMove = !0;
			var e = t.touches[0],
				i = e.clientX,
				o = e.clientY,
				r = t.touches[t.touches.length - 1],
				n = r.clientX,
				s = r.clientY,
				a = this._mapView.getCamera(),
				h = this._dom.getBoundingClientRect(),
				l = (i + n) / 2 - h.left,
				u = (o + s) / 2 - h.top;
			this._startAround = a.screenToWorldCoordinate(l, u), this._startTouches = this._lastTouches = [
				[i, o],
				[n, s]
			], this.animator && (this.animator.stop(), this.animator = void 0)
		}
	}, gi.prototype.onTouchmove = function(t) {
		var r = this;
		if (!(t.touches.length < 2) && this._isEnable() && this._isCanMove) {
			var e = t.touches[0],
				i = e.clientX,
				o = e.clientY,
				n = t.touches[t.touches.length - 1],
				s = n.clientX,
				a = n.clientY;
			this._curTouches = [
					[i, o],
					[s, a]
				], this._eventData = this._getEventData(this._lastTouches, this._curTouches), this._lastTouches = this._curTouches,
				this._pushInertias(), "pending" === this._state && (this._inertias = [], this._mapView.fire("moveStart"), this._isFirstFrame = !
					0, this._state = "active", this._zoomEnable && this._mapView.fire("zoomStart"), this._rotateEnable && this._mapView
					.fire("rotateStart"), this._pitchEnable && this._mapView.fire("pitchStart"), this._mapView.fire("gestureStart"),
					this._startTimer = window.setTimeout(function() {
						delete r._startTimer;
						var t = r._getEventData(r._startTouches, r._curTouches),
							e = t.zoomScale,
							i = t.rotateDelta,
							o = t.pitchDelta;
						r._isPitch = r._pitchEnable && Math.abs(1 - e) < .5 && Math.abs(i) < 6 && 0 !== o, r._startFrameUpdate()
					}, 64))
		}
	}, gi.prototype._pushInertias = function() {
		if (this._eventData) {
			var t = this._eventData,
				e = t.rotateDelta,
				i = t.zoomScale,
				o = t.center,
				r = this._mapView.getCamera(),
				n = r.getZoom();
			n = E(n = Math.log2(Math.pow(2, n) * i), this._mapView.getMinZoom(), this._mapView.getMaxZoom());
			var s = r.getRotate() - e,
				a = this._inertias[this._inertias.length - 1] || r.getRotate();
			this._inertias.push([Date.now(), n, F.normalizeRotate(s, a[2]), o])
		}
	}, gi.prototype.onTouchend = function(t) {
		this._stopFrameUpdate(t), this._startTimer && (clearTimeout(this._startTimer), delete this._startTimer)
	}, gi.prototype._isEnable = function() {
		return this._zoomEnable || this._pitchEnable || this._rotateEnable
	}, gi.prototype._frameUpdate = function() {
		var t = this._mapView.getEngine();
		if (t && this._startAround && this._eventData) {
			var e = this._eventData,
				i = e.center,
				o = e.rotateDelta,
				r = e.zoomScale,
				n = e.pitchDelta,
				s = t.getCamera(),
				a = {};
			if (this._isPitch) a.pitch = s.getPitch() - n;
			else {
				var h = s.getZoom();
				this._zoomEnable && (h = E(h = Math.log2(Math.pow(2, h) * r), this._mapView.getMinZoom(), this._mapView.getMaxZoom()),
					a.zoom = h);
				var l = s.getRotate();
				if (this._rotateEnable && .1 < Math.abs(o) && (l = s.getRotate() - o, a.rotate = l), this._zoomEnable || this._rotateEnable) {
					var u = this._inertias[this._inertias.length - 1] || s.getRotate();
					this._inertias.push([Date.now(), h, F.normalizeRotate(l, u[2]), i])
				}
			}
			s.set(a), "single" !== this._mapView.getViewType() || this._isPitch || s.setCenterAtPoint(this._startAround, i),
				t.render(), t.updateCollision(!1), this._lastTouches = this._curTouches
		}
		this._isFirstFrame = !1, this._timer = requestAnimationFrame(this._frameUpdate), this._mapView.fire("move"), this._isPitch ?
			this._pitchEnable && this._mapView.fire("pitch") : (this._zoomEnable && this._mapView.fire("zoom"), this._rotateEnable &&
				this._mapView.fire("rotate")), this._mapView.fire("gesture")
	}, gi.prototype._getEventData = function(t, e) {
		var i = new Nt(t[0], t[1]),
			o = new Nt(e[0], e[1]),
			r = e[0],
			n = r[0],
			s = r[1],
			a = e[1],
			h = a[0],
			l = a[1],
			u = this._dom.getBoundingClientRect(),
			_ = new S((n + h) / 2 - u.left, (s + l) / 2 - u.top),
			p = o.angleTo(i),
			c = o.getLength() / i.getLength(),
			f = s - t[0][1],
			g = l - t[1][1],
			d = 0;
		return 0 <= f * g && Math.abs(f - g) < 20 && (d = (f + g) / 2), {
			center: _,
			rotateDelta: p,
			zoomScale: c,
			pitchDelta: d
		}
	}, gi.prototype._stopFrameUpdate = function(t) {
		ci.prototype._stopFrameUpdate.call(this, t), this._timer && (delete this._timer, this._isPitch || this._inertialEnd(
			t)), this._isPitch = !1, delete this._lastTouches, delete this._curTouches, delete this._startAround
	}, gi.prototype._inertialEnd = function(t) {
		if (this._initInertial(), this._inertias.length < 2) this._fireEnd(t);
		else {
			var e = this._inertias[0],
				i = this._inertias[this._inertias.length - 1],
				o = (i[0] - e[0]) / 1e3,
				r = this._zoomEnable && function(t, e) {
					if (0 !== t && 0 !== e) {
						var i = .15 * t / e;
						2.5 < Math.abs(i) && (i = 2.5 * (0 < i ? 1 : -1));
						var o = Math.abs(i / (12 * .15));
						return {
							duration: o,
							offset: i * o / 2
						}
					}
				}(i[1] - e[1], o),
				n = this._rotateEnable && si(i[2] - e[2], o);
			if (r || n) {
				var s = 0,
					a = 0,
					h = 0;
				r && n ? (h = Math.max(r.duration, n.duration), s = r.offset, a = n.offset) : r ? (h = r.duration, s = r.offset) :
					n && (h = n.duration, a = n.offset), this._zoomInertia(s, a, 1e3 * h, i[3], t), this._inertias = []
			} else this._fireEnd(t)
		}
	}, gi.prototype._zoomInertia = function(t, o, e, r, n) {
		var s = this,
			a = this._mapView.getEngine(),
			h = this._startAround;
		if (a && h) {
			var l = a.getCamera(),
				u = l.getZoom(),
				_ = l.getRotate(),
				p = E(u + t, this._mapView.getMinZoom(), this._mapView.getMaxZoom()),
				i = (new L).ofNumber(0, 1, e);
			(this.animator = i).easing("easeOutCirc"), i.on("update", function(t) {
				var e = u + (p - u) * t.num,
					i = _ + o * t.num;
				l.set({
						zoom: e,
						rotate: i
					}), "single" === s._mapView.getViewType() && l.setCenterAtPoint(h, r), a.render(), a.updateCollision(!1), s._mapView
					.fire("move", n), s._mapView.fire("rotate", n)
			}).on("complete", function() {
				s._fireEnd(n)
			}).on("stop", function() {
				s._fireEnd(n)
			}).start()
		}
	}, gi.prototype._fireEnd = function(t) {
		this._mapView.fire("moveEnd", t), this._isPitch ? this._pitchEnable && this._mapView.fire("pitchEnd", t) : (this._zoomEnable &&
			this._mapView.fire("zoomEnd", t), this._rotateEnable && this._mapView.fire("rotateEnd", t)), this._mapView.fire(
			"gestureEnd", t)
	}, gi.LINEARITY = .15, gi.MAX_SPEED = 2.5, gi.DECELERATION = 12, gi);

	function gi(t) {
		var e = ci.call(this, t) || this;
		return e._zoomEnable = !0, e._rotateEnable = !0, e._pitchEnable = !0, e._isPitch = !1, e._isFirstFrame = !0, e._dom =
			t.getCanvasContainer(), u(["_frameUpdate"], e), e
	}
	var di = (yi.prototype.enable = function() {
		this._isEnable = !0
	}, yi.prototype.disable = function() {
		this._isEnable = !1
	}, yi.prototype.onWheel = function(t) {
		if (this._isEnable && 0 !== t.deltaY) {
			var e = this._mapView.getCamera();
			if (e) {
				this._stopTimer && (clearTimeout(this._stopTimer), delete this._stopTimer);
				var i = this._dom.getBoundingClientRect(),
					o = t.clientX - i.left,
					r = t.clientY - i.top;
				this._around = e.screenToWorldCoordinate(o, r), this._aroundPoint = new S(o, r);
				var n = this._mapView.getMinZoom(),
					s = this._mapView.getMaxZoom(),
					a = e.getZoom() + Math.log10(Math.abs(t.deltaY)) / 10 * (0 < t.deltaY ? -1 : 1);
				this._targetZoom = E(a, n, s), this._startFrameUpdate(), this._stopTimer = setTimeout(this._stopFrameUpdate, 300,
					3)
			}
		}
	}, yi.prototype._onScroll = function() {
		var t = this._mapView.getCamera();
		if (t) {
			var e = t.getZoom();
			e += (this._targetZoom - e) / 2, t.set({
				zoom: e
			}), this._around && this._aroundPoint && t.setCenterAtPoint(this._around, this._aroundPoint)
		}
	}, yi.prototype._startFrameUpdate = function() {
		this._timer || (this._mapView.fire("moveStart"), this._mapView.fire("zoomStart"), this._mapView.fire(
			"gestureStart"), this._frameUpdate())
	}, yi.prototype._frameUpdate = function() {
		var t = this._mapView.getEngine();
		this._onScroll(), t && (t.render(), t.updateCollision(!1)), this._mapView.fire("move"), this._mapView.fire("zoom"),
			this._mapView.fire("gesture"), this._timer = requestAnimationFrame(this._frameUpdate)
	}, yi.prototype._stopFrameUpdate = function(t) {
		this._timer && (cancelAnimationFrame(this._timer), delete this._timer, this._mapView.fire("moveEnd", t), this._mapView
			.fire("zoomEnd", t), this._mapView.fire("gestureEnd", t))
	}, yi);

	function yi(t) {
		this._targetZoom = 0, this._isEnable = !0, this._mapView = t, this._dom = this._mapView.getCanvasContainer(), u([
			"_frameUpdate", "_stopFrameUpdate"
		], this)
	}
	var mi = (vi.prototype.getScreen = function() {
		return this._screen
	}, vi.prototype.getWorld = function() {
		if (!this._world) {
			var t = this._target.getCanvasContainer().getBoundingClientRect(),
				e = this._screen.x - t.left,
				i = this._screen.y - t.top;
			this._world = this._target.screenToWorldCoordinate(e, i)
		}
		return this._world
	}, vi.prototype.cancel = function() {
		this._isCancel = !0
	}, vi.prototype.getOriginEvent = function() {
		return this._originEvent
	}, vi.prototype.isCancel = function() {
		return this._isCancel
	}, Object.defineProperty(vi.prototype, "world", {
		get: function() {
			return this.getWorld()
		},
		enumerable: !0,
		configurable: !0
	}), Object.defineProperty(vi.prototype, "point", {
		get: function() {
			return this._screen
		},
		enumerable: !0,
		configurable: !0
	}), vi);

	function vi(t, e) {
		this._isCancel = !1, this._originEvent = t, this._target = e;
		var i = t instanceof MouseEvent ? t : t.touches[0];
		this._screen = new S(i.clientX, i.clientY)
	}
	var xi = (wi.prototype._onWheel = function(t) {
		wi.stopOriginEvent(t), this._scrollZoom.onWheel(t)
	}, wi.prototype._onContextmenu = function(t) {
		wi.stopOriginEvent(t)
	}, wi.prototype._onClick = function(t) {
		wi.stopOriginEvent(t), this._fireClick(t)
	}, wi.prototype._fireClick = function(t) {
		var e = t instanceof MouseEvent ? new S(t.clientX, t.clientY) : new S(t.touches[0].clientX, t.touches[0].clientY);
		if (this._startPos && e.distanceTo(this._startPos) < 1) {
			var i = this._mapView.getEngine(),
				o = new mi(t, this._mapView);
			i && i.fire("click", o), o.isCancel() || this._mapView.fire("click", o)
		}
	}, wi.prototype._fireDbClick = function(t) {
		var e = t instanceof MouseEvent ? new S(t.clientX, t.clientY) : new S(t.touches[0].clientX, t.touches[0].clientY);
		this._animateDbClickZoom(e, 1), this._mapView.fire("dbClick", new mi(t, this._mapView))
	}, wi.prototype._onDbClick = function(t) {
		wi.stopOriginEvent(t), this._fireDbClick(t)
	}, wi.prototype.getAnimator = function() {
		return this._animator
	}, wi.prototype.setAnimator = function(t) {
		this._animator = t
	}, wi.prototype._animateDbClickZoom = function(t, e) {
		var i = this;
		this._animator && this._animator.stop();
		var o = this._mapView.getEngine();
		if (o) {
			var r = o.getCamera(),
				n = this._dom.getBoundingClientRect(),
				s = t.x - n.left,
				a = t.y - n.top,
				h = r.screenToWorldCoordinate(s, a),
				l = r.getZoom(),
				u = E(l + e, this._mapView.getMinZoom(), this._mapView.getMaxZoom());
			this._animator = (new L).ofNumber(l, u, 500), this._animator.easing("easeOutCirc"), this._fireEvent({
				zoom: e
			}, "Start"), this._mapView.fire("gestureStart"), this._animator.on("update", function(t) {
				i._fireEvent({
					zoom: t.num
				}, ""), i._mapView.fire("gesture"), r.set({
					zoom: t.num
				}), r.setCenterAtPoint(h, {
					x: s,
					y: a
				}), o.render(), o.updateCollision(!1)
			}).on("complete", function() {
				i._fireEvent({
					zoom: e
				}, "End"), i._mapView.fire("gestureEnd"), delete i._animator
			}).start()
		}
	}, wi.prototype._fireEvent = function(t, e) {
		var i = t.rotate,
			o = t.pitch,
			r = t.zoom;
		this._mapView.fire("move" + e), "number" == typeof i && this._mapView.fire("rotate" + e), "number" == typeof o &&
			this._mapView.fire("pitch" + e), "number" == typeof r && this._mapView.fire("zoom" + e)
	}, wi.prototype._onMousedown = function(t) {
		wi.stopOriginEvent(t), this._startPos = new S(t.clientX, t.clientY), this._dragPan.onMousedown(t), this._dragRotate
			.onMousedown(t);
		var e = this._mapView.getEngine(),
			i = new mi(t, this._mapView);
		e && e.fire("mousedown", i), i.isCancel() || this._mapView.fire("mousedown", i)
	}, wi.prototype._onMousemove = function(t) {
		wi.stopOriginEvent(t), this._dragPan.onMousemove(t), this._dragRotate.onMousemove(t);
		var e = this._mapView.getEngine(),
			i = new mi(t, this._mapView);
		e && e.fire("mousemove", i), i.isCancel() || this._mapView.fire("mousemove", i)
	}, wi.prototype._onMouseup = function(t) {
		wi.stopOriginEvent(t), this._dragPan.onMouseup(t), this._dragRotate.onMouseup(t);
		var e = this._mapView.getEngine(),
			i = new mi(t, this._mapView);
		e && e.fire("mouseup", i), i.isCancel() || this._mapView.fire("mouseup", i)
	}, wi.prototype._onMouseleave = function(t) {
		this._dragPan.onMouseleave(t), this._dragRotate.onMouseleave(t);
		var e = this._mapView.getEngine(),
			i = new mi(t, this._mapView);
		e && e.fire("mouseleave", i), i.isCancel() || this._mapView.fire("mouseleave", i)
	}, wi.prototype._onTouchstart = function(t) {
		wi.stopOriginEvent(t);
		var e = (this._touchEvent = t).touches[0];
		this._touchNum = t.touches.length, this._startPos = new S(e.clientX, e.clientY), delete this._lastPos, this._dragPan
			.onTouchstart(t), this._touchZoomRotate.onTouchstart(t), this._mapView.fire("touchstart", new mi(t, this._mapView))
	}, wi.prototype._onTouchmove = function(t) {
		wi.stopOriginEvent(t);
		var e = (this._touchEvent = t).touches[0];
		this._dragPan.onTouchmove(t), this._touchZoomRotate.onTouchmove(t), this._touchNum = t.touches.length, this._lastPos =
			new S(e.clientX, e.clientY), this._mapView.fire("touchmove", new mi(t, this._mapView))
	}, wi.prototype._onTouchend = function(t) {
		if (wi.stopOriginEvent(t), this._touchEvent) {
			var e = Date.now();
			this._startPos && 1 === this._touchNum && (!this._lastPos || this._lastPos.distanceTo(this._startPos) < 1) && (
					this._fireClick(this._touchEvent), e - this._lastTouchTime < 300 && this._fireDbClick(this._touchEvent)), this._lastTouchTime =
				e, this._touchNum = 0, this._dragPan.onTouchend(t), this._touchZoomRotate.onTouchend(t), this._mapView.fire(
					"touchend", new mi(this._touchEvent, this._mapView)), delete this._touchEvent
		}
	}, wi.prototype.destroy = function() {
		this._dom.removeEventListener("click", this._onClick), this._dom.removeEventListener("mousedown", this._onMousedown),
			this._dom.removeEventListener("mousemove", this._onMousemove), this._dom.removeEventListener("mouseup", this._onMouseup),
			this._dom.removeEventListener("mouseleave", this._onMouseleave), this._dom.removeEventListener("dblclick", this._onDbClick),
			this._dom.removeEventListener("touchstart", this._onTouchstart), this._dom.removeEventListener("touchmove", this._onTouchmove),
			this._dom.removeEventListener("touchend", this._onTouchend), this._dom.removeEventListener("contextmenu", this._onContextmenu),
			this._dom.removeEventListener("wheel", this._onWheel)
	}, wi.prototype.disableDrag = function() {
		this._dragPan.disable()
	}, wi.prototype.enableDrag = function() {
		this._dragPan.enable()
	}, wi.prototype.disableZoom = function() {
		this._scrollZoom.disable(), this._touchZoomRotate.disableZoom()
	}, wi.prototype.enableZoom = function() {
		this._scrollZoom.enable(), this._touchZoomRotate.enableZoom()
	}, wi.prototype.disableRotate = function() {
		this._dragRotate.disableRotate(), this._touchZoomRotate.disableRotate()
	}, wi.prototype.enableRotate = function() {
		this._dragRotate.enableRotate(), this._touchZoomRotate.enableRotate()
	}, wi.prototype.disablePitch = function() {
		this._dragRotate.disablePitch(), this._touchZoomRotate.disablePitch()
	}, wi.prototype.enablePitch = function() {
		this._dragRotate.enablePitch(), this._touchZoomRotate.enablePitch()
	}, wi.stopOriginEvent = function(t) {
		t.stopPropagation(), t.preventDefault()
	}, wi);

	function wi(t) {
		this._touchNum = 0, this._lastTouchTime = Date.now(), this._mapView = t, this._dragPan = new hi(t), this._touchZoomRotate =
			new fi(t), this._scrollZoom = new di(t), this._dragRotate = new _i(t), u(["_frameUpdate", "_onClick",
				"_onMousedown", "_onMousemove", "_onMouseup", "_onDbClick", "_onTouchstart", "_onTouchmove", "_onTouchend",
				"_onContextmenu", "_onMouseleave", "_onWheel"
			], this), this._dom = this._mapView.getCanvasContainer(), this._dom.addEventListener("click", this._onClick), this._dom
			.addEventListener("mousedown", this._onMousedown), this._dom.addEventListener("mousemove", this._onMousemove), this
			._dom.addEventListener("mouseup", this._onMouseup), this._dom.addEventListener("mouseleave", this._onMouseleave),
			this._dom.addEventListener("dblclick", this._onDbClick), this._dom.addEventListener("touchstart", this._onTouchstart),
			this._dom.addEventListener("touchmove", this._onTouchmove), this._dom.addEventListener("touchend", this._onTouchend),
			this._dom.addEventListener("contextmenu", this._onContextmenu), this._dom.addEventListener("wheel", this._onWheel)
	}
	var Mi = (Ti.prototype.insert = function(r, n) {
		return v(this, void 0, void 0, function() {
			var e, i, o;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return [4, this._openPromise];
					case 1:
						return t.sent(), e = this._db.transaction(r, "readwrite"), i = e.objectStore(r), o = i.add(n), [2, new Promise(
							function(t, e) {
								o.addEventListener("success", t), o.addEventListener("error", e)
							})]
				}
			})
		})
	}, Ti.prototype.update = function(r, n) {
		return v(this, void 0, void 0, function() {
			var e, i, o;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return [4, this._openPromise];
					case 1:
						return t.sent(), e = this._db.transaction(r, "readwrite"), i = e.objectStore(r), o = i.put(n), [2, new Promise(
							function(t, e) {
								o.addEventListener("success", t), o.addEventListener("error", e)
							})]
				}
			})
		})
	}, Ti.prototype.select = function(r, n) {
		return v(this, void 0, void 0, function() {
			var e, i, o;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return [4, this._openPromise];
					case 1:
						return t.sent(), e = this._db.transaction(r, "readwrite"), i = e.objectStore(r), o = i.get(n), [2, new Promise(
							function(t, e) {
								o.addEventListener("success", function() {
									return t(o.result)
								}), o.addEventListener("error", function(t) {
									return e(t)
								})
							})]
				}
			})
		})
	}, Ti);

	function Ti(t, e) {
		var i = this,
			n = window.indexedDB.open(t),
			s = e.tableNames;
		this._openPromise = new Promise(function(t) {
			n.addEventListener("success", function() {
				i._db = n.result, t("success")
			}), n.addEventListener("upgradeneeded", function() {
				for (var t = n.result, e = 0; e < s.length; e += 1) {
					var i = s[e],
						o = i.name,
						r = i.keyPath;
					t.objectStoreNames.contains(o) || t.createObjectStore(o, {
						keyPath: r
					})
				}
			})
		})
	}
	var bi = (Ci.prototype.decrypt = function(t) {
		for (var e = t.length, i = this._getDynamicKey(e), o = i.length, r = [], n = 0; n < e; n += 1) r.push(t[n] ^ i[n %
			o]);
		return Ci.byteToString(r)
	}, Ci.prototype._getDynamicKey = function(t) {
		for (var e = this._options.key, i = t % e.length, o = [], r = i; r < e.length; r += 1) {
			var n = e.charAt(r);
			o.push(n)
		}
		for (r = 0; r < i; r += 1) n = e.charAt(r), o.push(n);
		return Ci.stringToByte(o.join(""))
	}, Ci.stringToByte = function(t) {
		for (var e = [], i = 0; i < t.length; i += 1) {
			var o = t.charCodeAt(i);
			e.push(o)
		}
		return e
	}, Ci.byteToString = function(t) {
		for (var e = 0, i = ""; e < t.length;) {
			var o = t[e++];
			if (0 === o) break;
			if (0 == (128 & o)) i += String.fromCharCode(o);
			else if (192 == (224 & o)) {
				var r = 63 & t[e++];
				i += String.fromCharCode((31 & o) << 6 | r)
			} else if (224 == (240 & o)) {
				r = 63 & t[e++];
				var n = 63 & t[e++];
				i += String.fromCharCode((31 & o) << 12 | r << 6 | n)
			} else if (240 == (248 & o)) {
				var s = (7 & o) << 18 | (r = 63 & t[e++]) << 12 | (n = 63 & t[e++]) << 6 | 63 & t[e++];
				65535 < s && (s -= 65536, i += String.fromCharCode(s >>> 10 & 1023 | 55296), s = 56320 | 1023 & s), i += String.fromCharCode(
					s)
			}
		}
		return i
	}, Ci);

	function Ci(t) {
		this._options = t
	}
	var Ei = (Li.prototype._decrypt = function(t) {
		if (!this._isAPI_SDK) return t;
		var e = new Int8Array(t);
		return JSON.parse(this._security.decrypt(e))
	}, Li.prototype.requestFloors = function(n, s) {
		return v(this, void 0, Promise, function() {
			var e, i, o, r = this;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return this._dbMng ? (e = Li.generateKey(n, s), [4, this._dbMng.select("floor", e)]) : [3, 2];
					case 1:
						if (i = t.sent()) return requestAnimationFrame(function() {
							return r._requestFloors(n, s, !0)
						}), [2, this._decrypt(i.data)];
						t.label = 2;
					case 2:
						return [4, this._requestFloors(n, s)];
					case 3:
						return o = t.sent(), [2, this._decrypt(o)]
				}
			})
		})
	}, Li.prototype._requestFloors = function(n, s, a) {
		return void 0 === a && (a = !1), v(this, void 0, void 0, function() {
			var e, i, o, r;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return e = this._server + "/floor/bybuilding/" + n, this._isAPI_SDK ? [4, Je.get(e, m(m({}, this._appKey ?
							{
								headers: {
									appKey: this._appKey
								}
							} : {}), {
							query: m({
								f0enable: 1,
								coordinateType: 2
							}, s),
							responseType: "arraybuffer"
						}))] : [3, 2];
					case 1:
						return o = t.sent(), [3, 4];
					case 2:
						return [4, Je.get(e, {
							query: m({
								f0enable: 1,
								coordinateType: 2
							}, s)
						})];
					case 3:
						o = t.sent(), t.label = 4;
					case 4:
						return i = o, this._dbMng && (r = Li.generateKey(n, s), a ? this._dbMng.update("floor", {
							bdId: r,
							data: i
						}) : this._dbMng.insert("floor", {
							bdId: r,
							data: i
						})), [2, i]
				}
			})
		})
	}, Li.prototype.requestPlanarGraph = function(n, s) {
		return v(this, void 0, void 0, function() {
			var e, i, o, r = this;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return this._dbMng ? (e = Li.generateKey(n, s), [4, this._dbMng.select("geojson", e)]) : [3, 2];
					case 1:
						if (i = t.sent()) return requestAnimationFrame(function() {
							return r._requestPlanarGraph(n, s, !0)
						}), [2, Li.parsePlanarGraph(this._decrypt(i.data))];
						t.label = 2;
					case 2:
						return [4, this._requestPlanarGraph(n, s)];
					case 3:
						return o = t.sent(), [2, Li.parsePlanarGraph(this._decrypt(o))]
				}
			})
		})
	}, Li.prototype._requestPlanarGraph = function(n, s, a) {
		return void 0 === a && (a = !1), v(this, void 0, void 0, function() {
			var e, i, o, r;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return e = this._server + "/geojson/" + n, this._isAPI_SDK ? [4, Je.get(e, m(m({}, this._appKey ? {
							headers: {
								appKey: this._appKey
							}
						} : {}), {
							query: m({
								coordinateType: 2
							}, s),
							responseType: "arraybuffer"
						}))] : [3, 2];
					case 1:
						return o = t.sent(), [3, 4];
					case 2:
						return [4, Je.get(e, {
							query: m({
								key: "Palmap+2017",
								coordinateType: 2
							}, s)
						})];
					case 3:
						o = t.sent(), t.label = 4;
					case 4:
						return i = o, this._dbMng && (r = Li.generateKey(n, s), a ? this._dbMng.update("geojson", {
							floorId: r,
							data: i
						}) : this._dbMng.insert("geojson", {
							floorId: r,
							data: i
						})), [2, i]
				}
			})
		})
	}, Li.generateKey = function(t, e) {
		return e.version ? t + "_" + e.version : t
	}, Li.parsePlanarGraph = function(t) {
		var e = t.area,
			i = t.frame,
			o = t.facility,
			r = t.shop;
		return {
			area: e.features || [],
			shop: r && r.features || [],
			frame: i.features || [],
			facility: o.features || []
		}
	}, Li.getTextByArea = function(t) {
		for (var e = [], i = 0; i < t.length; i += 1) {
			var o = t[i].properties;
			o && (o.labelpoint || o.center) && e.push(_(o.labelpoint || o.center, o))
		}
		return e
	}, Li.SECURITY_KEY = "MDbGUVkWecymbrveAkwXwRVhAYRUDParAPuSftqdmaeNmNcansDOyeVpnMSOSwTC", Li);

	function Li(t) {
		var e = t.appKey,
			i = t.server;
		if (this._options = t, this._security = new bi({
				key: Li.SECURITY_KEY
			}), this._appKey = e, this._server = i, this._isAPI_SDK = /new-sdknagrand\.ipalmap\.com\:18090/.test(this._server),
			window.indexedDB && this._options.useCache) {
			var o = this._isAPI_SDK ? "palmap-map-json-new" : "palmap-map-json";
			this._dbMng = new Mi(o, {
				tableNames: [{
					name: "floor",
					keyPath: "bdId"
				}, {
					name: "geojson",
					keyPath: "floorId"
				}]
			})
		}
	}
	var Ii, Ri = {
			server: "https://new-sdknagrand.ipalmap.com:18090",
			useCache: !0,
			minZoom: 10,
			maxZoom: 30,
			enableOutdoor: !1,
			viewType: "single",
			floorHeight: 30,
			localFontFamily: "sans-serif",
			fontWeight: "normal",
			maxTextSize: 10,
			multiFadeOpacity: .5
		},
		Si = (e(Pi, Ii = ii), Pi.prototype.getBdId = function() {
			return this._options.buildingId
		}, Pi.prototype.getFloorData = function(t) {
			return this._floorMap.get(t)
		}, Pi.prototype.setViewType = function(i) {
			return v(this, void 0, void 0, function() {
				var e;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							if (!this._engine || this._viewType === i) return [2];
							if (this._viewType = i, "single" !== this._viewType) return [3, 3];
							for (this._engine.getCamera().setZ(0), e = 0; e < this._outdoorLayers.length; e += 1) this._outdoorLayers[
								e].setMultiLayout({
								opacity: 1,
								base: 0
							});
							for (e = 0; e < this._layers.length; e += 1) this._layers[e].setMultiLayout({
								opacity: 1,
								base: 0
							});
							return this.currentFloor ? [4, this._drawPlanarGraph(this.currentFloor)] : [3, 2];
						case 1:
							t.sent(), t.label = 2;
						case 2:
							return [3, 5];
						case 3:
							return "multiple" !== this._viewType ? [3, 5] : (this._hasDrawMultiple = !1, [4, this._drawMultiPlanarGraph()]);
						case 4:
							t.sent(), t.label = 5;
						case 5:
							return this.fire("changeViewType", this._viewType), [2]
					}
				})
			})
		}, Pi.prototype._setupContainer = function(t) {
			t.classList.add("ngr-map"), t.appendChild(this._domControlContainer["bottom-left"]), t.appendChild(this._domControlContainer[
				"bottom-right"]), t.appendChild(this._domControlContainer["top-left"]), t.appendChild(this._domControlContainer[
				"top-right"]), t.appendChild(this._canvasContainer)
		}, Pi.prototype.getDomControlContainer = function() {
			return this._domControlContainer
		}, Pi.prototype.setControlTop = function(t, e) {
			void 0 === e && (e = 0), this._domControlContainer["top-right"].style.transform = "translateY(" + t + ")", this._domControlContainer[
					"top-right"].style.transition = "transform " + e + "s", this._domControlContainer["top-left"].style.transform =
				"translateY(" + t + ")", this._domControlContainer["top-left"].style.transition = "transform " + e + "s"
		}, Pi.prototype.setControlBottom = function(t, e) {
			void 0 === e && (e = 0), this._domControlContainer["bottom-right"].style.transform = "translateY(-" + t + ")",
				this._domControlContainer["bottom-right"].style.transition = "transform " + e + "s", this._domControlContainer[
					"bottom-left"].style.transform = "translateY(-" + t + ")", this._domControlContainer["bottom-left"].style.transition =
				"transform " + e + "s"
		}, Pi.prototype.init = function(o, r) {
			return v(this, void 0, void 0, function() {
				var e, i;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							if ("string" == typeof o ? e = document.getElementById(o) : o instanceof HTMLElement && (e = o), !e) throw new Error(
								"the container is not exit");
							if (this._container = e, this._setupContainer(this._container), !r) throw new Error("style is required");
							return this._execLoading(), [4, Ii.prototype.init.call(this, this._canvasContainer, r)];
						case 1:
							return t.sent(), this.fire("init"), [4, this._loadFloors()];
						case 2:
							return t.sent(), this._defaultFloor ? (i = this._outdoorFloor || this._floorMap.get(this._defaultFloor),
								this._setupOffset(i), this._outdoorFloor && this._options.enableOutdoor ? [4, this._drawPlanarGraph(this
									._outdoorFloor.flId)] : [3, 4]) : (this._execError(new Error("the " + this._options.buildingId +
								" is empty")), [2]);
						case 3:
							t.sent(), t.label = 4;
						case 4:
							return [4, this.setCurrentFloor(this._defaultFloor)];
						case 5:
							return t.sent(), this._execLoaded(), [2]
					}
				})
			})
		}, Pi.prototype.preload = function() {
			return v(this, void 0, void 0, function() {
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return [4, this._loadFloors()];
						case 1:
							return t.sent(), this._outdoorFloor && this._requestPlanarGraph(this._outdoorFloor.flId), this._defaultFloor &&
								this._requestPlanarGraph(this._defaultFloor), [2]
					}
				})
			})
		}, Pi.prototype.setCurrentFloor = function(e) {
			return v(this, void 0, void 0, function() {
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return this.currentFloor !== e && this._floorMap.has(e) ? (this.currentFloor = e, this.fire("changeFloor",
								e), "single" !== this._viewType ? [3, 2] : [4, this._drawPlanarGraph(e)]) : [2];
						case 1:
							return t.sent(), [3, 4];
						case 2:
							return "multiple" !== this._viewType ? [3, 4] : [4, this._drawMultiPlanarGraph()];
						case 3:
							t.sent(), t.label = 4;
						case 4:
							return [2]
					}
				})
			})
		}, Pi.prototype.getDefaultFloor = function() {
			return this._defaultFloor
		}, Pi.prototype.updateBuildingId = function(n) {
			return v(this, void 0, void 0, function() {
				var e, i, o, r;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return this._options.buildingId === n ? [2] : (this._options.buildingId = n, this._engine ? (this._engine.getBucketMng()
								.clearRegister(), this._reset(), this._execLoading(), [4, this._loadFloors()]) : [2]);
						case 1:
							return t.sent(), this._defaultFloor ? (e = this._outdoorFloor || this._floorMap.get(this._defaultFloor),
								this._setupOffset(e), i = e.center.coordinates, o = i[0], r = i[1], this._engine.getCamera().set({
									center: {
										x: o,
										y: r
									}
								}), this._outdoorFloor && this._options.enableOutdoor ? [4, this._drawPlanarGraph(this._outdoorFloor.flId)] :
								[3, 3]) : [2];
						case 2:
							t.sent(), t.label = 3;
						case 3:
							return [4, this.setCurrentFloor(this._defaultFloor)];
						case 4:
							return t.sent(), this._execLoaded(), [2]
					}
				})
			})
		}, Pi.prototype._reset = function() {
			this._layers.length = 0, this._outdoorLayers.length = 0, this._hasDrawFloorId.clear(), this._hasDrawMultiple = !1,
				this._planarGraphMap.clear(), this._floors.length = 0, this._floorMap.clear(), delete this._outdoorFloor, delete this
				._defaultFloor
		}, Pi.prototype.highlightFloor = function(t) {
			"multiple" === this._viewType && (this._updatePlanarGraphOpacity(t), this._engine && this._engine.render())
		}, Pi.prototype._drawMultiPlanarGraph = function() {
			return v(this, void 0, void 0, function() {
				var e, i, o, r, n, s = this;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							if (!this.currentFloor) return [2];
							if (this._hasDrawMultiple) return e = this.getFloorHeight(this.currentFloor), (i = this._engine) && (o = i
								.getCamera(), this._animator && this._animator.stop(), this._animator = new L, this._animator.ofNumber(
									o.getZ(), e, 500), this._animator.easing("easeOutCirc"), this._animator.on("update", function(t) {
									o.setZ(t.num), i.render()
								}).on("complete", function() {
									delete s._animator, s.currentFloor && (s._updatePlanarGraphOpacity(), i.updateCollision())
								}).start()), [2];
							this.fire("startRender"), r = 0, t.label = 1;
						case 1:
							return r < this._floors.length ? [4, this._requestPlanarGraph(this._floors[r].flId)] : [3, 4];
						case 2:
							n = t.sent(), this._drawPlanarGraphLayer(this._floors[r].flId, n), t.label = 3;
						case 3:
							return r += 1, [3, 1];
						case 4:
							return this._engine && this._engine.getCamera().setZ(this.getFloorHeight(this.currentFloor)), this._update(
								this._floors), this.fire("renderEnd"), this._hasDrawMultiple = !0, [2]
					}
				})
			})
		}, Pi.prototype.getPlanarGraph = function(t) {
			return this._requestPlanarGraph(t)
		}, Pi.prototype.getFloorHeight = function(t) {
			var e = this._floorMap.get(t);
			return (e ? (1 === e.altitude ? 0 : e.altitude) / 5 : 0) * this._options.floorHeight
		}, Pi.prototype.getFloors = function() {
			return this._floors
		}, Pi.prototype._drawPlanarGraph = function(i) {
			return v(this, void 0, void 0, function() {
				var e;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return this._styleMng ? this._hasDrawFloorId.has(i) ? (this._update(this._floors), [2]) : [4, this._requestPlanarGraph(
								i)] : [2];
						case 1:
							return e = t.sent(), this.fire("startRender"), this._drawPlanarGraphLayer(i, e), this._update(this._floors),
								this.fire("renderEnd"), [2]
					}
				})
			})
		}, Pi.prototype._loadFloors = function() {
			return v(this, void 0, void 0, function() {
				var e, i, o;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return [4, this._requestFloors(this._options.buildingId)];
						case 1:
							for (f(e = t.sent(), function(t, e) {
									return t.altitude - e.altitude
								}), o = 0; o < e.length; o += 1) 0 === e[o].altitude ? this._outdoorFloor = e[o] : (this._floors.push(e[o]),
								this._floorMap.set(e[o].flId, e[o])), e[o].defaultFloor && (i = e[o].flId);
							return !i && 0 < this._floors.length && (i = this._floors[0].flId), this._defaultFloor || (this._defaultFloor =
								i), this.fire("loadFloors", this._floors), [2]
					}
				})
			})
		}, Pi.prototype._execLoading = function() {
			this._status = "loading", this.fire("loading")
		}, Pi.prototype._execError = function(t) {
			this._status = "error", this.fire("error", t)
		}, Pi.prototype._execLoaded = function() {
			return v(this, void 0, void 0, function() {
				return x(this, function(t) {
					return this._status = "loaded", this.fire("loaded"), [2]
				})
			})
		}, Pi.prototype.getContainer = function() {
			return this._container
		}, Pi.prototype.getCanvasContainer = function() {
			return this._canvasContainer
		}, Pi.prototype.getStatus = function() {
			return this._status
		}, Pi.prototype.addControl = function(t) {
			this._controls.set(t.getName(), t)
		}, Pi.prototype.getControl = function(t) {
			return this._controls.get(t)
		}, Pi.prototype.removeControl = function(t) {
			return this._controls.delete(t)
		}, Pi.prototype.validFloorId = function(t) {
			return this._floorMap.has(t)
		}, Pi.prototype.queryFeaturesByWorld = function(t, e, i) {
			if (!this._engine || !this.currentFloor || !this._styleMng) return [];
			var o = this._styleMng.getStyle("area");
			if (!o) return [];
			for (var r = [], n = this._engine.getLayers(), s = 0; s < n.length; s += 1) {
				var a = n[s].getFloorId(),
					h = !i || n[s].getName() === i,
					l = a === this.currentFloor || Pi.OUT_REG.test(a),
					u = n[s].getType();
				("FillExtrusion" === u || "Fill" === u) && h && l && r.push.apply(r, n[s].queryFeaturesByWorld(t, e))
			}
			r.reverse();
			var _ = [];
			for (s = 0; s < r.length; s += 1) _.push({
				features: r[s],
				height: Rt.getStyle(o, "height", r[s].properties) || 0
			});
			return f(_, function(t, e) {
				return e.height - t.height
			}), _.map(function(t) {
				return t.features
			})
		}, Pi.prototype.queryFeaturesByPoint = function(t, e, i) {
			if (!this._engine || !this.currentFloor || !this._styleMng) return [];
			var o = this.screenToWorldCoordinate(t, e);
			return this.queryFeaturesByWorld(o.x, o.y, i)
		}, Pi.prototype.setBackground = function(t) {
			this._canvasContainer.style.background = t
		}, Pi.prototype.transformFloorId = function(t) {
			return Pi.OUT_REG.test(t) ? this._defaultFloor || t.replace(Pi.OUT_REG, "F01") : t
		}, Pi.prototype.destroy = function() {
			this._engine && this._engine.destroy(), this._domControlContainer["bottom-left"].remove(), this._domControlContainer[
					"bottom-right"].remove(), this._domControlContainer["top-left"].remove(), this._domControlContainer["top-right"]
				.remove(), this._canvasContainer.remove(), this._container && (this._container.classList.remove("ngr-map"),
					delete this._container), this._gestureManager.destroy(), this._reset()
		}, Object.defineProperty(Pi.prototype, "gestureManager", {
			get: function() {
				return this._gestureManager
			},
			enumerable: !0,
			configurable: !0
		}), Pi.prototype.getStyle = function() {
			return this._styleMng && this._styleMng.getOriginStyle()
		}, Pi.prototype.getLayout = function(t) {
			return this._styleMng && this._styleMng.getStyle(t)
		}, Pi.prototype.updateStyle = function(n) {
			return v(this, void 0, void 0, function() {
				var e, i, o, r;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return [4, this._styleMng.updateStyle(n)];
						case 1:
							if (e = t.sent(), (i = this._styleMng.getStyle("mapBackgroundColor")) && this.setBackground(i), "single" !==
								this._viewType) return [3, 2];
							if (!this._engine || !this.currentFloor) return [2];
							for (this._hasDrawFloorId.clear(), this._updatePlanarGraphDiff(this.currentFloor, e), this._hasDrawFloorId
								.add(this.currentFloor), this._options.enableOutdoor && this._outdoorFloor && this._updatePlanarGraphDiff(
									this._outdoorFloor.flId, e), this._engine.getBucketMng().enableNormalize(), this._engine.getBucketMng().clear(),
								o = this._outdoorLayers.concat(this._layers), this._engine.clear(), r = 0; r < o.length; r += 1) o[r].setGroupId(
								this.currentFloor), (r < this._outdoorLayers.length || this._checkIsNeedAdd(o[r])) && this._engine.addLayer(
								o[r]);
							return this._engine.sortLayer(), [3, 6];
						case 2:
							return this._hasDrawMultiple = !1, this._hasDrawFloorId.clear(), this._layers.length = 0, this._outdoorLayers
								.length = 0, this._options.enableOutdoor && this._outdoorFloor ? [4, this._drawPlanarGraph(this._outdoorFloor
									.flId)] : [3, 4];
						case 3:
							t.sent(), t.label = 4;
						case 4:
							return [4, this._drawMultiPlanarGraph()];
						case 5:
							t.sent(), t.label = 6;
						case 6:
							return [2]
					}
				})
			})
		}, Pi.prototype._updatePlanarGraphDiff = function(t, e) {
			var i = this._planarGraphMap.get(t);
			if (i) {
				var o, r = /F00$/.test(t),
					n = this._filterDiffLayers(r ? this._outdoorLayers : this._layers, e),
					s = n.frameLayers,
					a = n.areaLayers,
					h = n.otherLayers,
					l = i.frame,
					u = i.area,
					_ = i.shop,
					p = i.facility;
				if (r ? this._outdoorLayers.length = 0 : this._layers.length = 0, -1 !== e.indexOf("frame") && this._drawFrame(l,
						t), -1 !== e.indexOf("area") && (o = this._drawArea(u.concat(_), t)), -1 !== e.indexOf("facility") && this._drawFacility(
						p, t), -1 !== e.indexOf("areaText")) {
					var c = o ? o.text : Ei.getTextByArea(u.concat(_));
					this._drawAreaText(c, t)
				}
				if (-1 !== e.indexOf("extra")) {
					var f = o ? o.extra : this._filterExtra(u.concat(_));
					this._drawExtra(f, t)
				}
				r ? this._outdoorLayers = s.concat(this._outdoorLayers).concat(a).concat(h) : this._layers = s.concat(this._layers)
					.concat(a).concat(h)
			}
		}, Pi.prototype._filterExtra = function(t) {
			for (var e = [], i = 0; i < t.length; i += 1) this._styleMng.filterExtra(t[i].properties) && e.push(t[i]);
			return e
		}, Pi.prototype._filterDiffLayers = function(t, e) {
			for (var i = [], o = [], r = [], n = 0; n < t.length; n += 1) {
				var s = t[n].getName();
				Pi.isSelf(s) && -1 !== e.indexOf(s) || ("area" === s ? o.push(t[n]) : "frame" === s ? i.push(t[n]) : r.push(t[n]))
			}
			return {
				frameLayers: i,
				areaLayers: o,
				otherLayers: r
			}
		}, Pi.prototype._requestFloors = function(o) {
			return v(this, void 0, void 0, function() {
				var e, i;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							this.fire("loadFloorStart"), t.label = 1;
						case 1:
							return t.trys.push([1, 3, , 4]), [4, this._res.requestFloors(o, "version" in this._options ? {
								version: this._options.version
							} : {})];
						case 2:
							return e = t.sent(), this.fire("loadFloorEnd"), [2, e];
						case 3:
							throw i = t.sent(), this._execError(i), this.fire("loadFloorEnd"), i;
						case 4:
							return [2]
					}
				})
			})
		}, Pi.prototype._requestPlanarGraph = function(r) {
			return v(this, void 0, void 0, function() {
				var e, i, o;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							if (this.fire("loadPlanarGraphStart"), e = this._planarGraphMap.get(r)) return [2, e];
							t.label = 1;
						case 1:
							return t.trys.push([1, 3, , 4]), [4, this._res.requestPlanarGraph(r, "version" in this._options ? {
								version: this._options.version
							} : {})];
						case 2:
							return i = t.sent(), this._planarGraphMap.set(r, i), this.fire("loadPlanarGraphEnd"), [2, i];
						case 3:
							throw o = t.sent(), this._execError(o), this.fire("loadPlanarGraphEnd"), o;
						case 4:
							return [2]
					}
				})
			})
		}, Pi.prototype.setAreaTextVisible = function(t) {
			this._setVisible("areaText", t)
		}, Pi.prototype.setFacilityVisible = function(t) {
			this._setVisible("facility", t)
		}, Pi.prototype._setVisible = function(t, e) {
			for (var i = this._outdoorLayers.concat(this._layers), o = 0; o < i.length; o += 1) i[o].getName() === t && i[o].setLayout({
				visible: e
			});
			this._engine && this._engine.updateCollision()
		}, Pi.prototype.setColorById = function(t, e) {
			if (0 !== t.length) {
				for (var i = {}, o = 0; o < t.length; o += 1) i[t[o]] = {
					fillColor: e
				};
				var r = this._outdoorLayers.concat(this._layers);
				for (o = 0; o < r.length; o += 1) {
					var n = r[o].getType();
					if ("Fill" === n || "FillExtrusion" === n)
						for (var s = r[o].getFeatures(), a = 0; a < s.length; a += 1)
							if (i[(s[a].properties || {}).id]) {
								var h = r[o].getLayout(),
									l = G(h.keys || []); - 1 === l.indexOf("id") && l.unshift("id"), r[o].setLayout({
									keys: l,
									values: m(m({}, h.values), i)
								});
								break
							}
				}
			}
		}, Pi.prototype.resetColorById = function(t) {
			for (var e = new Set(t), i = this._outdoorLayers.concat(this._layers), o = 0; o < i.length; o += 1) {
				var r = i[o].getType();
				if ("Fill" === r || "FillExtrusion" === r)
					for (var n = i[o].getFeatures(), s = 0; s < n.length; s += 1) {
						var a = (n[s].properties || {}).id;
						if (e.has(a)) {
							i[o].resetLayout();
							break
						}
					}
			}
		}, Pi);

	function Pi(t) {
		var e = Ii.call(this, m(m({}, Ri), t)) || this;
		e._floors = [], e._floorMap = new Map, e._status = "init", e._controls = new Map, e._hasDrawMultiple = !1, e._planarGraphMap =
			new Map;
		var i = e._options,
			o = i.buildingId,
			r = i.appKey;
		if (!o || !r) throw new Error("MapView: init failed");
		e._canvasContainer = document.createElement("div"), e._canvasContainer.classList.add("ngr-canvas-container"), e._canvasContainer
			.style.background = e._options.background || "";
		var n = document.createElement("div");
		n.classList.add("ngr-control-top-left");
		var s = document.createElement("div");
		s.classList.add("ngr-control-top-right");
		var a = document.createElement("div");
		a.classList.add("ngr-control-bottom-left");
		var h = document.createElement("div");
		return h.classList.add("ngr-control-bottom-right"), e._domControlContainer = {
			"top-left": n,
			"top-right": s,
			"bottom-left": a,
			"bottom-right": h
		}, e._gestureManager = new xi(e), e._res = new Ei({
			appKey: e._options.appKey,
			server: e._options.server,
			useCache: e._options.useCache
		}), e
	}
	var Fi = (Ai.prototype.setStyle = function(t) {
		for (var e in t) this._container.style[e] = t[e]
	}, Ai.prototype.addTo = function(t) {
		this._mapView = t, this._mapView.addControl(this);
		var e = this._mapView.getDomControlContainer(),
			i = this._options.position;
		e && e[i].appendChild(this._container)
	}, Ai.prototype.hide = function() {
		this._container.style.display = "none"
	}, Ai.prototype.show = function() {
		this._container.style.display = ""
	}, Ai.prototype.getName = function() {
		return this._name
	}, Ai.prototype.getContainer = function() {
		return this._container
	}, Ai.prototype.remove = function() {
		this._container.remove(), this._mapView && this._mapView.removeControl(this._name), delete this._mapView
	}, Ai);

	function Ai(t, e) {
		this._name = t, this._options = e, this._container = document.createElement("div"), this._container.classList.add(
			"ngr-control")
	}
	var Vi, Ni = {
			position: "bottom-right"
		},
		Bi = (e(ki, Vi = Fi), ki.prototype._zoomIn = function() {
			this._mapView && this._mapView.zoomIn()
		}, ki.prototype._zoomOut = function() {
			this._mapView && this._mapView.zoomOut()
		}, ki.prototype._onZoomEnd = function() {
			if (this._mapView) {
				this._zoomInBtn.disabled = !0, this._zoomOutBtn.disabled = !0;
				var t = this._mapView.getMaxZoom(),
					e = this._mapView.getMinZoom(),
					i = this._mapView.getZoom();
				i <= e ? this._zoomInBtn.disabled = !1 : (i < t && (this._zoomInBtn.disabled = !1), this._zoomOutBtn.disabled = !
					1)
			}
		}, ki.prototype.addTo = function(t) {
			Vi.prototype.addTo.call(this, t), t.on("zoomEnd", this._onZoomEnd)
		}, ki.prototype.remove = function() {
			this._zoomInBtn.removeEventListener("click", this._zoomIn), this._zoomOutBtn.removeEventListener("click", this._zoomOut),
				this._mapView && this._mapView.off("zoomEnd", this._onZoomEnd), Vi.prototype.remove.call(this)
		}, ki);

	function ki(t) {
		void 0 === t && (t = {});
		var e = Vi.call(this, "zoom", m(m({}, Ni), t)) || this;
		return u(["_zoomIn", "_zoomOut", "_onZoomEnd"], e), e._container.classList.add("ngr-zoom-control"), e._zoomInBtn =
			document.createElement("button"), e._zoomInBtn.classList.add("ngr-zoom-in-btn"), e._zoomInBtn.classList.add(
				"ngr-click-active"), e._options.zoomInImg && (e._zoomInBtn.style.backgroundImage = "url(" + e._options.zoomInImg +
				")"), e._zoomOutBtn = document.createElement("button"), e._zoomOutBtn.classList.add("ngr-zoom-out-btn"), e._zoomOutBtn
			.classList.add("ngr-click-active"), e._options.zoomOutImg && (e._zoomOutBtn.style.backgroundImage = "url(" + e._options
				.zoomOutImg + ")"), e._container.appendChild(e._zoomInBtn), e._container.appendChild(e._zoomOutBtn), e._zoomInBtn.addEventListener(
				"click", e._zoomIn), e._zoomOutBtn.addEventListener("click", e._zoomOut), e
	}
	var Oi, zi = {
			position: "bottom-left",
			duration: 300
		},
		Di = (e(Ui, Oi = Fi), Ui.prototype._onChangeViewType = function() {
			this._mapView && this._multiDom && ("multiple" === this._mapView.getViewType() ? this._options.singleUrl ? this._multiDom
				.style.backgroundImage = "url(" + this._options.singleUrl + ")" : (this._multiDom.classList.remove(
					"ngr-multiple"), this._multiDom.classList.add("ngr-single")) : this._options.multipleUrl ? this._multiDom.style
				.backgroundImage = "url(" + this._options.multipleUrl + ")" : (this._multiDom.classList.add("ngr-multiple"),
					this._multiDom.classList.remove("ngr-single")))
		}, Ui.prototype._setupMultiple = function() {
			var e = this;
			this._multiDom = document.createElement("div"), this._container.style.borderRadius = "0 0 4px 4px", this._container
				.style.background = "transparent", this._multiDom.classList.add("ngr-view-change"), this._container.appendChild(
					this._multiDom), this._multiDom.addEventListener("click", function() {
					if (e._mapView) {
						var t = "multiple" === e._mapView.getViewType() ? "single" : "multiple";
						e._mapView.setViewType(t)
					}
				})
		}, Ui.prototype._setupCustom = function(t) {
			var e = document.createElement("style"),
				i = Rt.parseColor(t);
			e.textContent = "\n            .ngr-floor-active {\n                color: " + t +
				";\n                border-color: " + t + ";\n                background: rgba(" + 255 * i[0] + ", " + 255 * i[1] +
				", " + 255 * i[2] +
				", 0.1);\n            }\n            .ngr-floor-active::before {\n                border-left-color: " + t +
				";\n            }\n            .ngr-floor-active::after {\n                border-right-color: " + t +
				";\n            }\n        ", document.head.appendChild(e)
		}, Ui.prototype.setLocationManager = function(t) {
			this._locationMng = t
		}, Ui.prototype.removeLocationManager = function() {
			delete this._locationMng
		}, Ui.prototype.addTo = function(t) {
			Oi.prototype.addTo.call(this, t), t.on("loadFloors", this._onGetFloors), t.on("changeFloor", this._onChangeFloor),
				t.on("changeViewType", this._onChangeViewType), this._onChangeViewType()
		}, Ui.prototype.remove = function() {
			this._mapView && (this._mapView.off("loadFloors", this._onGetFloors), this._mapView.off("changeFloor", this._onChangeFloor),
				this._mapView.off("changeViewType", this._onChangeViewType)), Oi.prototype.remove.call(this)
		}, Ui.prototype._onChangeFloor = function(t) {
			var e = this._floorList.children;
			if (!this._isShow)
				for (var i = 0; i < this._floors.length; i += 1)
					if (this._floors[i].flId === t) return void(e[0].textContent = this._floors[i].floorAddress);
			var o = 0;
			for (i = 0; i < e.length; i += 1) {
				var r = e[i];
				r.classList.remove("ngr-floor-active"), r.dataset.flId === t && (o = i, r.classList.add("ngr-floor-active"))
			}
			this._animateScrollByIndex(o)
		}, Ui.prototype.show = function() {
			this._isShow = !0, this._createFloorItem(this._floors), this._mapView && this._mapView.currentFloor && this._onChangeFloor(
				this._mapView.currentFloor), this._multiDom && (this._multiDom.style.display = "")
		}, Ui.prototype.hide = function() {
			var e = this;
			this._isShow = !1;
			var t = this._floors.filter(function(t) {
				return e._mapView && t.flId === e._mapView.currentFloor
			});
			this._createFloorItem(t), this._multiDom && (this._multiDom.style.display = "none")
		}, Ui.prototype._animateScrollByIndex = function(t) {
			var e = this;
			if (0 !== this._floorList.children.length) {
				this._animator && this._animator.stop();
				var i = this._floorList.children[0].getBoundingClientRect().height,
					o = this._floorList.scrollTop,
					r = i * (t - 1);
				o !== (r = r < 0 ? 0 : r) && (this._animator = (new L).ofNumber(o, r, this._options.duration), this._animator.on(
					"update",
					function(t) {
						e._floorList.scrollTop = t.num
					}).on("complete", function() {
					delete e._animator
				}).start())
			}
		}, Ui.prototype._onGetFloors = function(t) {
			this._floors = Array.from(t), this._floors.sort(function(t, e) {
				return e.altitude - t.altitude
			}), this._createFloorItem(this._floors)
		}, Ui.prototype._createFloorItem = function(i) {
			var o = this;
			this._floorList.innerHTML = "";
			for (var t = function(t) {
					var e = document.createElement("li");
					e.classList.add("ngr-floor-item"), r._mapView && r._mapView.currentFloor === i[t].flId && e.classList.add(
							"ngr-floor-active"), e.classList.add("ngr-click-active"), e.textContent = "F0" === i[t].floorAddress ? "全院" :
						i[t].floorAddress, e.dataset.flId = i[t].flId, e.addEventListener("click", function() {
							o._locationMng && o._locationMng.setAutoChangeFloor(!1), o._mapView && e.dataset.flId && o._mapView.setCurrentFloor(
								e.dataset.flId)
						}), r._floorList.appendChild(e)
				}, r = this, e = 0; e < i.length; e += 1) t(e)
		}, Ui);

	function Ui(t) {
		void 0 === t && (t = {});
		var e = Oi.call(this, "floor", m(m({}, zi), t)) || this;
		e._floors = [], e._isShow = !0, u(["_onGetFloors", "_onChangeFloor", "_onChangeViewType"], e), e._options.showMultiple &&
			e._setupMultiple(), e._floorList = document.createElement("ul"), e._floorList.classList.add("ngr-floor-list"), e._container
			.appendChild(e._floorList), e._container.classList.add("ngr-floor-control");
		var i = e._options.activeColor;
		return i && e._setupCustom(i), e
	}
	var Gi, Wi = {
			position: "top-left"
		},
		Zi = (e(ji, Gi = Fi), ji.prototype.addTo = function(t) {
			Gi.prototype.addTo.call(this, t), t.on("rotate", this._onRotate), t.once("init", this._onRotate)
		}, ji.prototype.remove = function() {
			this._mapView && (this._mapView.off("rotate", this._onRotate), Gi.prototype.remove.call(this))
		}, ji.prototype._onRotate = function() {
			if (this._mapView) {
				var t = this._mapView.getRotate();
				this._container.style.transform = "rotateZ(" + -t + "deg)"
			}
		}, ji);

	function ji(t) {
		void 0 === t && (t = {});
		var e = Gi.call(this, "compass", m(m({}, Wi), t)) || this;
		return u(["_onRotate"], e), e._container.classList.add("ngr-compass-control"), e._options.imgUrl && (e._container.style
			.backgroundImage = "url(" + e._options.imgUrl + ")"), e._container.addEventListener("click", function() {
			if (e._mapView && !e._options.isIgnoreRest) {
				var t = Math.abs(e._mapView.getRotate() || 0) / 100 * 1e3;
				e._mapView.easeTo({
					rotate: 0,
					duration: t
				})
			}
		}), e
	}
	var Yi, Hi = {
			position: "bottom-left"
		},
		qi = (e(Xi, Yi = Fi), Xi.prototype.addTo = function(t) {
			Yi.prototype.addTo.call(this, t), t.on("pitchEnd", this._onPitchEnd), t.once("init", this._onPitchEnd), this._onPitchEnd()
		}, Xi.prototype.remove = function() {
			this._mapView && this._mapView.off("pitchEnd", this._onPitchEnd), this._container.removeEventListener("click",
				this._onClick), Yi.prototype.remove.call(this)
		}, Xi.prototype._onClick = function() {
			this._mapView && (this._is3D ? this._mapView.easeTo({
				pitch: 0
			}) : this._mapView.easeTo({
				pitch: 60
			}))
		}, Xi.prototype._onPitchEnd = function() {
			this._mapView && (this._mapView.getPitch() < 45 ? (this._is3D = !1, this._options.img3D ? this._container.style.backgroundImage =
				"url(" + this._options.img3D + ")" : this._container.textContent = "3D") : (this._is3D = !0, this._options.img2D ?
				this._container.style.backgroundImage = "url(" + this._options.img2D + ")" : this._container.textContent = "2D"
			))
		}, Xi);

	function Xi(t) {
		void 0 === t && (t = {});
		var e = Yi.call(this, "view", m(m({}, Hi), t)) || this;
		return e._is3D = !1, u(["_onPitchEnd", "_onClick"], e), e._container.classList.add("ngr-view-control"), e._container
			.classList.add("ngr-click-active"), e._container.addEventListener("click", e._onClick), e
	}
	var Ki, Qi = {
			maxWidth: 100,
			isShowLogo: !0,
			showScaleTime: 800,
			position: "bottom-left"
		},
		Ji = (e($i, Ki = Fi), $i.prototype.addTo = function(t) {
			Ki.prototype.addTo.call(this, t), t.on("move", this._onMove), t.once("init", this._onMove), this._onMove()
		}, $i.prototype._onMove = function() {
			var t = this;
			this._toggleLogo(!1), this._calculateScale(), this._options.isShowLogo && (this._showLogoTimer && clearTimeout(
				this._showLogoTimer), this._showLogoTimer = window.setTimeout(function() {
				t._toggleLogo(!0)
			}, this._options.showScaleTime))
		}, $i.prototype._calculateScale = function() {
			if (this._mapView) {
				var t = this._mapView.getCamera();
				if (t) {
					var e = t.getOnePixelToWorld(),
						i = this._options.maxWidth * e,
						o = $i.getRoundNum(i),
						r = o / i * this._options.maxWidth;
					this._scale.textContent = o + "m", this._scale.style.width = r + "px"
				}
			}
		}, $i.prototype._toggleLogo = function(t) {
			this._logoDom && (this._logoDom.style.display = t ? "" : "none"), this._scale.style.display = t ? "none" : ""
		}, $i.getRoundNum = function(t) {
			var e = Math.pow(10, ("" + Math.floor(t)).length - 1),
				i = t / e;
			return e * (i = 10 <= i ? 10 : 5 <= i ? 5 : 3 <= i ? 3 : 2 <= i ? 2 : 1)
		}, $i);

	function $i(t) {
		void 0 === t && (t = {});
		var e = this,
			i = m(m({}, Qi), t);
		return u(["_onMove"], e = Ki.call(this, "scale", i) || this), e._container.classList.add("ngr-scale-control"), e._scale =
			document.createElement("div"), e._scale.classList.add("ngr-scale"), e._container.appendChild(e._scale), e._options.isShowLogo &&
			(e._logoDom = document.createElement("div"), e._logoDom.className = "ngr-logo", e._options.logoUrl && (e._logoDom.style
				.backgroundImage = "url(" + e._options.logoUrl + ")"), e._container.appendChild(e._logoDom)), e
	}
	var to, eo = {
			position: "bottom-left",
			duration: 500
		},
		io = (e(oo, to = Fi), oo.prototype._onClick = function() {
			return v(this, void 0, void 0, function() {
				var e, i, o;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return this._locationMng && this._mapView ? this._locationMng.hasPosition() ? (this._locationMng.setAutoChangeFloor(
								!0), (e = this._locationMng.getPosition()) ? (i = e.floorId, o = e.coordinate, i === this._mapView.currentFloor ?
								[3, 2] : [4, this._mapView.setCurrentFloor(i)]) : [2]) : [2] : (console.error(
								"LocationManager is required"), [2]);
						case 1:
							t.sent(), t.label = 2;
						case 2:
							switch (this._locateStatus) {
								case "normal":
									this._mapView.easeTo({
											center: o,
											duration: this._options.duration
										}), this._locateStatus = "center", this._container.style.backgroundImage = "", this._options.centerImg ?
										this._container.style.backgroundImage = "url(" + this._options.centerImg + ")" : (this._container.classList
											.remove("ngr-locate-3d"), this._container.classList.add("ngr-locate-center"));
									break;
								case "center":
									this._mapView.easeTo({
											rotate: this._locationMng.getRotate(),
											pitch: 60
										}), this._locateStatus = "3d", this._container.style.backgroundImage = "", this._options.img3D ? this._container
										.style.backgroundImage = "url(" + this._options.img3D + ")" : (this._container.classList.remove(
											"ngr-locate-center"), this._container.classList.add("ngr-locate-3d"));
									break;
								case "3d":
									this._mapView.easeTo({
											rotate: 0,
											pitch: 0
										}), this._locateStatus = "normal", this._container.style.backgroundImage = "", this._options.activeImg ?
										this._container.style.backgroundImage = "url(" + this._options.activeImg + ")" : (this._container.classList
											.remove("ngr-locate-3d"), this._container.classList.remove("ngr-locate-center"))
							}
							return [2]
					}
				})
			})
		}, oo.prototype._onLocationSuccess = function() {
			this._container.style.backgroundImage = "", this._options.activeImg ? this._container.style.backgroundImage =
				"url(" + this._options.activeImg + ")" : this._container.classList.add("ngr-locate-success")
		}, oo.prototype._onMove = function() {
			this._locateStatus = "normal", this._container.classList.remove("ngr-locate-3d"), this._container.classList.remove(
				"ngr-locate-center")
		}, oo.prototype.addTo = function(t) {
			to.prototype.addTo.call(this, t), t.on("touchstart", this._onMove)
		}, oo.prototype.remove = function() {
			this._mapView && this._mapView.off("touchstart", this._onMove), this._locationMng && this._locationMng.off(
				"locationSuccess", this._onLocationSuccess), to.prototype.remove.call(this)
		}, oo.prototype.setLocationManager = function(t) {
			this._locationMng = t, this._locationMng.on("locationSuccess", this._onLocationSuccess)
		}, oo);

	function oo(t) {
		var e = to.call(this, "location", m(m({}, eo), t)) || this;
		return e._locateStatus = "normal", u(["_onClick", "_onLocationSuccess", "_onMove"], e), e._container.classList.add(
			"ngr-locate-control"), e._container.classList.add("ngr-click-active"), e._options.normalImg && (e._container.style
			.backgroundImage = "url(" + e._options.normalImg + ")"), e._container.addEventListener("click", e._onClick), e
	}
	var ro, no = {
			position: "top-right"
		},
		so = (e(ao, ro = Fi), ao.prototype._onClick = function() {
			if (this._mapView)
				if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement) document.exitFullscreen ?
					document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen &&
					document.webkitExitFullscreen();
				else {
					var t = this._mapView.getContainer();
					if (!t) return;
					t.requestFullscreen ? t.requestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.webkitRequestFullscreen ?
						t.webkitRequestFullscreen() : t.msRequestFullscreen && t.msRequestFullscreen()
				}
		}, ao.prototype._onFullscreenchange = function() {
			document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement ? this._options.notFullUrl ?
				this._container.style.backgroundImage = "url(" + this._options.notFullUrl + ")" : (this._container.classList.add(
					"ngr-not-full"), this._container.classList.remove("ngr-full")) : this._options.fullUrl ? this._container.style.backgroundImage =
				"url(" + this._options.fullUrl + ")" : (this._container.classList.remove("ngr-not-full"), this._container.classList
					.add("ngr-full"))
		}, ao.prototype.remove = function() {
			ro.prototype.remove.call(this), this._container.removeEventListener("click", this._onClick), document.removeEventListener(
					"fullscreenchange", this._onFullscreenchange), document.removeEventListener("webkitfullscreenchange", this._onFullscreenchange),
				document.removeEventListener("mozfullscreenchange", this._onFullscreenchange)
		}, ao);

	function ao(t) {
		void 0 === t && (t = {});
		var e = ro.call(this, "fullscreen", m(m({}, no), t)) || this;
		return u(["_onFullscreenchange", "_onClick"], e), e._container.classList.add("ngr-fullscreen-control"), e._container
			.classList.add("ngr-click-active"), document.addEventListener("fullscreenchange", e._onFullscreenchange), document.addEventListener(
				"webkitfullscreenchange", e._onFullscreenchange), document.addEventListener("mozfullscreenchange", e._onFullscreenchange),
			e._container.addEventListener("click", e._onClick), e._onFullscreenchange(), e
	}
	var ho, lo = {
			anchor: "center"
		},
		uo = {
			top: "translate(-50%, 0)",
			center: "translate(-50%, -50%)",
			bottom: "translate(-50%, -100%)",
			"top-left": "translate(0, 0)",
			"top-right": "translate(-100%, 0)",
			"bottom-left": "translate(0, -100%)",
			"bottom-right": "translate(-100%, -100%)",
			left: "translate(0, -50%)",
			right: "translate(-100%, -50%)"
		},
		_o = (e(po, ho = i), po.prototype.setProperties = function(t) {
			this._properties = t
		}, po.prototype.getProperties = function() {
			return this._properties
		}, po.prototype._setupContainer = function() {
			this._container.classList.add("ngr-marker"), this._container.addEventListener("touchstart", po.touchHandle), this._container
				.addEventListener("touchmove", po.touchHandle), this._container.addEventListener("touchend", po.touchHandle),
				this._options.draggable && this._container.addEventListener("mousedown", this._onmousedown)
		}, po.touchHandle = function(t) {
			t.stopPropagation()
		}, po.prototype._onmousedown = function(t) {
			t.stopPropagation(), this._mapView && (this._mapView.gestureManager.disableDrag(), this._startPoint = new S(t.clientX,
					t.clientY), this._mapView.on("mousemove", this._onmousemove), this._mapView.on("mouseup", this._onmouseup),
				this._mapView.on("mouseleave", this._onmouseup), this.fire("dragstart", t))
		}, po.prototype._onmousemove = function(t) {
			if (this._mapView && this._startPoint && this._screen) {
				var e = new S(t.getScreen().x, t.getScreen().y),
					i = e.clone().subtract(this._startPoint),
					o = this._screen.clone().add(i);
				this._updatePosition(o.x, o.y), this._startPoint = e, this.fire("drag", t)
			}
		}, po.prototype._onmouseup = function(t) {
			this._mapView && this._startPoint && this._screen && (this._mapView.gestureManager.enableDrag(), this._coordinate =
				this._mapView.screenToWorldCoordinate(this._screen.x, this._screen.y), this._mapView.off("mousemove", this._onmousemove),
				this._mapView.off("mouseup", this._onmouseup), this._mapView.off("mouseleave", this._onmouseup), this.fire(
					"dragend", t))
		}, po.prototype.setAlwaysShow = function(t) {
			this._alwaysShow = t, this._update()
		}, po.prototype.getAlwaysShow = function() {
			return this._alwaysShow
		}, po.prototype.addTo = function(t) {
			this._mapView = t, this._mapView.on("move", this._update), this._mapView.on("changeFloor", this._update), this._mapView
				.on("rotate", this._onPitch), this._options.plane && (this._mapView.on("pitch", this._onPitch), this._onPitch()),
				this._update()
		}, po.prototype._onPitch = function() {
			var t = 0;
			this._options.plane && this._mapView && (t = this._mapView.getPitch() || 0), this._dom.style.transformOrigin =
				this._options.anchor.split("-").join(" "), this._dom.style.transform = "rotateX(" + t + "deg) rotateZ(" + this._rotate +
				"deg)"
		}, po.prototype.setRotate = function(t) {
			this._rotate = t, this._onPitch()
		}, po.prototype._addDom = function() {
			this._mapView && this._mapView.getCanvasContainer().appendChild(this._container)
		}, po.prototype.setPosition = function(t, e, i) {
			void 0 === i && (i = !0), this._floorId = t, this._coordinate = new S(e.x, e.y), i && this._update()
		}, po.prototype._update = function() {
			if (this._mapView && this._coordinate && this._floorId && this._isShow)
				if (this._mapView.currentFloor === this._floorId || this._alwaysShow) {
					this._container.parentElement || this._addDom();
					var t = this._mapView.getEngine();
					if (!t) return;
					var e = t.getCamera().worldToScreenCoordinate(this._coordinate.x, this._coordinate.y);
					this._updatePosition(e.x, e.y)
				} else this._container.remove();
			else this._container.remove()
		}, po.prototype._updatePosition = function(t, e) {
			this._screen = new S(t, e), this._container.style.transform = uo[this._options.anchor] + " translate(" + t +
				"px, " + e + "px)"
		}, po.prototype.show = function() {
			this._isShow || (this._isShow = !0, this._update())
		}, po.prototype.hide = function() {
			this._isShow && (this._isShow = !1, this._container.remove())
		}, po.prototype.updateDom = function(t) {
			this._dom.remove(), this._container.appendChild(t), this._dom = t, this._onPitch()
		}, po.prototype.getDom = function() {
			return this._dom
		}, po.prototype.getPosition = function() {
			if (this._floorId && this._coordinate) return {
				floorId: this._floorId,
				coordinate: this._coordinate && this._coordinate.clone()
			}
		}, po.prototype.remove = function() {
			this._container.remove(), this._mapView && (this._mapView.off("move", this._update), this._mapView.off(
					"changeFloor", this._update), this._mapView.off("pitch", this._onPitch), this._mapView.off("rotate", this._onPitch)),
				delete this._mapView
		}, po);

	function po(t, e) {
		void 0 === e && (e = {});
		var i = ho.call(this) || this;
		return i._rotate = 0, i._alwaysShow = !1, i._isShow = !0, u(["_update", "_onPitch", "_onmousedown", "_onmousemove",
				"_onmouseup"
			], i), i._options = m(m({}, lo), e), i._container = document.createElement("div"), i._setupContainer(), i._dom = t,
			i._container.appendChild(i._dom), i
	}
	var co = (fo.prototype.setProperties = function(t) {
		this._properties = t
	}, fo.prototype.getProperties = function() {
		return this._properties
	}, fo.prototype.getLayer = function() {
		return this._layer
	}, fo.prototype.setIgnoreMultiFade = function(t) {
		this._layer.setIgnoreMultiFade(t)
	}, fo.prototype.getIgnoreMultiFade = function() {
		return this._layer.getIgnoreMultiFade()
	}, fo.prototype.setLayout = function(t) {
		this._options = t, this._layer.setLayout(fo.getLayoutFromOptions(t))
	}, fo.prototype.setAlwaysShow = function(t) {
		this._layer.setAlwaysShow(t), this._mapView && this._mapView.updateLayer(this._layer)
	}, fo.prototype.getAlwaysShow = function() {
		return this._layer.getAlwaysShow()
	}, fo.prototype.setPosition = function(t, e) {
		this._layer.setFloorId(t), this._coordinate = new S(e.x, e.y), this._mapView && (this._layer.setFeatures([{
			type: "Feature",
			geometry: {
				type: "Point",
				coordinates: [e.x, e.y]
			},
			properties: {}
		}]), this._mapView.updateLayer(this._layer))
	}, fo.prototype.getPosition = function() {
		var t = this._layer.getFloorId();
		if (t && this._coordinate) return {
			floorId: t,
			coordinate: this._coordinate && this._coordinate.clone()
		}
	}, fo.prototype.on = function(t, e) {
		this._layer.on(t, e)
	}, fo.prototype.once = function(t, e) {
		this._layer.once(t, e)
	}, fo.prototype.off = function(t, e) {
		this._layer.off(t, e)
	}, fo.prototype.addTo = function(t) {
		if (!this._mapView) {
			this._mapView = t, this._mapView.addLayer(this._layer);
			var e = this._layer.getFloorId();
			e && this._coordinate && this.setPosition(e, this._coordinate)
		}
	}, fo.prototype.remove = function() {
		this._layer.off("mousedown", this._onmousedown), this._mapView && (this._mapView.removeLayer(this._layer), delete this
			._mapView)
	}, fo.prototype._onmousedown = function(t) {
		var e = t.e;
		e.cancel(), 1 === e.getOriginEvent().which && this._mapView && (this._startWorld = e.getWorld(), this._mapView.gestureManager
			.disableDrag(), this._mapView.on("mousemove", this._onmousemove), this._mapView.on("mouseup", this._onmouseup),
			this._mapView.on("mouseleave", this._onmouseup), this._layer.fire("dragstart", e), this._startFrameUpdate())
	}, fo.prototype._onmousemove = function(t) {
		this._dragEvent = t
	}, fo.prototype._onmouseup = function(t) {
		this._stopFrameUpdate(), this._mapView && this._startWorld && (this._mapView.gestureManager.enableDrag(), delete this
			._startWorld, this._mapView.off("mousemove", this._onmousemove), this._mapView.off("mouseup", this._onmouseup),
			this._mapView.off("mouseleave", this._onmouseup), this._layer.fire("dragend", t))
	}, fo.prototype._startFrameUpdate = function() {
		this._updateTimer || this._frameUpdate()
	}, fo.prototype._frameUpdate = function() {
		if (this._startWorld && this._dragEvent) {
			var t = this._dragEvent.world.clone().subtract(this._startWorld),
				e = this._layer.getFloorId();
			this._coordinate && e && this.setPosition(e, this._coordinate.clone().add(t)), this._startWorld = this._dragEvent
				.world, this._layer.fire("drag", this._dragEvent)
		}
		this._updateTimer = requestAnimationFrame(this._frameUpdate)
	}, fo.prototype._stopFrameUpdate = function() {
		this._updateTimer && (cancelAnimationFrame(this._updateTimer), delete this._updateTimer), delete this._dragEvent
	}, fo.getLayoutFromOptions = function(t) {
		var e = m({}, t);
		return delete e.draggable, e
	}, fo);

	function fo(t) {
		u(["_onmousedown", "_onmousemove", "_onmouseup", "_onclick", "_frameUpdate"], this), this._options = t, this._layer =
			new He(fo.getLayoutFromOptions(t)), this._options.draggable && this._layer.on("mousedown", this._onmousedown)
	}
	var go, yo = (e(mo, go = Me), mo.prototype.update = function(t) {
		var e = t.vertices,
			i = t.normals,
			o = t.indices,
			r = t.texture,
			n = t.texCoords,
			s = t.deviation;
		this._texture = r, this._initArrayBuffer(this._texCoordsBuffer, n), this._initIndexBuffer(this._indicesBuffer, o),
			this._initArrayBuffer(this._verticesBuffer, e), this._initArrayBuffer(this._normalsBuffer, i), this._initArrayBuffer(
				this._deviationBuffer, s), this.indicesNum = o.length
	}, mo.prototype.bind = function(t) {
		var e = t.a_position,
			i = t.a_normal,
			o = t.a_texCoord,
			r = t.a_deviation;
		this._vertexAttribPointer(e, this._verticesBuffer, 2), this._vertexAttribPointer(i, this._normalsBuffer, 2), this._vertexAttribPointer(
			r, this._deviationBuffer, 3), this._gl.bindTexture(this._gl.TEXTURE_2D, this._texture), this._vertexAttribPointer(
			o, this._texCoordsBuffer, 2), this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer)
	}, mo);

	function mo(t) {
		var e = go.call(this, t) || this;
		return e.indicesNum = 0, e._texture = e._gl.createTexture(), e._indicesBuffer = e._gl.createBuffer(), e._normalsBuffer =
			e._gl.createBuffer(), e._verticesBuffer = e._gl.createBuffer(), e._deviationBuffer = e._gl.createBuffer(), e._texCoordsBuffer =
			e._gl.createBuffer(), e
	}
	var vo, xo = (e(wo, vo = xe), wo.prototype.clear = function() {
		this._features.length = 0, this._geometryRenderList.length = 0
	}, wo.prototype._updateRenderList = function(t) {
		if (this._engine) {
			this._geometryRenderList.length = 0;
			for (var e = this._engine.getTextureMng(), i = t.info, o = 0; o < i.length; o += 1) {
				var r = new yo(this._engine.getGl()),
					n = e.getEmptyTexture(),
					s = [0, 0],
					a = i[o].iconUrl;
				if (a) {
					var h = e.getTexture(a, wo.TEXTURE_PARAMS);
					h && (n = h.texture, s = [h.width, h.height])
				}
				r.update({
					vertices: i[o].vertices,
					texCoords: i[o].texCoords,
					normals: i[o].normals,
					texture: n,
					deviation: i[o].deviation,
					indices: i[o].indices
				}), this._geometryRenderList.push({
					buffer: r,
					lineColor: i[o].color,
					base: i[o].base,
					opacity: i[o].opacity,
					useTexture: Boolean(a),
					lineWidth: i[o].width,
					imgSize: s
				})
			}
		}
	}, wo.prototype.setLayout = function(t) {
		this._layout = m(m({}, this._layout), t), 0 !== this._features.length && this._update()
	}, wo.prototype.queryFeaturesByWorld = function(t, e) {
		if (!this._engine) return [];
		var i = this._engine.getCamera().getOnePixelToWorld();
		return Ae(this._layout, this._features, {
			x: t,
			y: e
		}, i)
	}, wo.prototype.getGeometryRenderList = function() {
		return this._geometryRenderList
	}, wo.prototype._update = function() {
		var e = this;
		if (this._engine) {
			for (var t = 0; t < this._features.length; t += 1) this._calcPolyline(this._features[t]);
			var i = this._engine.getBucketMng(),
				o = {
					id: this.id,
					type: "line",
					features: this._features,
					layout: this._layout,
					offset: this._engine.getOffset(),
					taskId: this._getTaskId(),
					sync: this.getSync()
				};
			0 === this._loadPromiseSet.size ? i.update(o) : new Promise(function(t) {
				Promise.all(e._loadPromiseSet).then(t).catch(t)
			}).then(function() {
				i.update(o)
			})
		}
	}, wo.prototype._calcPolyline = function(t) {
		var e = this;
		if (this._engine) {
			var i = this._engine.getTextureMng(),
				o = Rt.getStyle(this._layout, "lineImage", t.properties);
			if (o && !i.getTexture(o, wo.TEXTURE_PARAMS)) {
				var r = i.loadTexture(o, wo.TEXTURE_PARAMS);
				this._loadPromiseSet.add(r), r.then(function() {
					return e._loadPromiseSet.delete(r)
				})
			}
		}
	}, wo.TEXTURE_PARAMS = {
		xRepeat: !0,
		yRepeat: !0
	}, wo.DEFAULT_LAYOUT = {
		visible: !0,
		lineWidth: 10,
		opacity: 1,
		base: 0,
		lineColor: "#666666"
	}, wo);

	function wo(t) {
		var e = vo.call(this, "Line", m(m({}, wo.DEFAULT_LAYOUT), t)) || this;
		return e._geometryRenderList = [], e._loadPromiseSet = new Set, e
	}
	var Mo, To = (e(bo, Mo = Me), bo.prototype.update = function(t) {
		var e = t.vertices,
			i = t.indices;
		this.indicesNum = i.length, this._initArrayBuffer(this._verticesBuffer, e), this._initIndexBuffer(this._indicesBuffer,
			i)
	}, bo.prototype.bind = function(t) {
		this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer), this._vertexAttribPointer(t, this._verticesBuffer,
			2)
	}, bo);

	function bo(t) {
		var e = Mo.call(this, t) || this;
		return e.indicesNum = 0, e._verticesBuffer = e._gl.createBuffer(), e._indicesBuffer = e._gl.createBuffer(), e
	}
	var Co, Eo = (e(Lo, Co = xe), Lo.prototype.clear = function() {
		this._features.length = 0, this._geometryRenderList.length = 0
	}, Lo.prototype.setLayout = function(t) {
		this._layout = m(m({}, this._layout), t), 0 !== this._features.length && this._update()
	}, Lo.prototype.queryFeaturesByWorld = function(t, e) {
		if (!this._engine) return [];
		var i = this._engine.getCamera().getOnePixelToWorld();
		return Ae(this._layout, this._features, {
			x: t,
			y: e
		}, i)
	}, Lo.prototype._updateRenderList = function(t) {
		if (this._engine) {
			this._geometryRenderList.length = 0;
			for (var e = t.info, i = 0; i < e.length; i += 1) {
				var o = new To(this._engine.getGl());
				o.update({
					vertices: e[i].vertices,
					indices: e[i].indices
				}), this._geometryRenderList.push({
					buffer: o,
					color: e[i].color,
					base: e[i].base,
					opacity: e[i].opacity
				})
			}
		}
	}, Lo.prototype.getGeometryRenderList = function() {
		return this._geometryRenderList
	}, Lo.prototype._update = function() {
		if (this._engine) {
			var t = {
				id: this.id,
				features: this._features,
				layout: this._layout,
				type: "track",
				offset: this._engine.getOffset(),
				taskId: this._getTaskId(),
				sync: this.getSync()
			};
			this._engine.getBucketMng().update(t)
		}
	}, Lo.GEOMETRY_KEYS = ["color", "base"], Lo.DEFAULT_LAYOUT = {
		visible: !0,
		base: 0,
		opacity: 1,
		color: "#333333"
	}, Lo);

	function Lo(t) {
		var e = Co.call(this, "Track", m(m({}, Lo.DEFAULT_LAYOUT), t)) || this;
		return e._geometryRenderList = [], e
	}
	var Io, Ro = (e(So, Io = Me), So.prototype.update = function(t) {
		var e = t.vertices,
			i = t.normals,
			o = t.texCoords,
			r = t.indices,
			n = t.map,
			s = t.texture;
		this.indicesNum = r.length, this._initArrayBuffer(this._verticesBuffer, e), this._initArrayBuffer(this._normalsBuffer,
				i), this._initArrayBuffer(this._texCoordsBuffer, o), this._initIndexBuffer(this._indicesBuffer, r), n ? (this._texture =
				this._gl.createTexture(), this._gl.bindTexture(this._gl.TEXTURE_2D, this._texture), this._gl.texParameteri(this._gl
					.TEXTURE_2D, this._gl.TEXTURE_MAG_FILTER, this._gl.LINEAR), this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl
					.TEXTURE_MIN_FILTER, this._gl.LINEAR), this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_S,
					this._gl.CLAMP_TO_EDGE), this._gl.texParameteri(this._gl.TEXTURE_2D, this._gl.TEXTURE_WRAP_T, this._gl.CLAMP_TO_EDGE),
				this._gl.texImage2D(this._gl.TEXTURE_2D, 0, this._gl.RGBA, this._gl.RGBA, this._gl.UNSIGNED_BYTE, n)) : this._texture =
			s
	}, So.prototype.bind = function(t, e, i) {
		this._vertexAttribPointer(t, this._verticesBuffer, 3), this._vertexAttribPointer(e, this._texCoordsBuffer, 2),
			this._vertexAttribPointer(i, this._normalsBuffer, 3), this._gl.bindTexture(this._gl.TEXTURE_2D, this._texture),
			this._gl.bindBuffer(this._gl.ELEMENT_ARRAY_BUFFER, this._indicesBuffer)
	}, So);

	function So(t) {
		var e = Io.call(this, t) || this;
		return e.indicesNum = 0, e._verticesBuffer = t.createBuffer(), e._normalsBuffer = t.createBuffer(), e._indicesBuffer =
			t.createBuffer(), e._texture = t.createTexture(), e._texCoordsBuffer = t.createBuffer(), e
	}
	var Po = (Fo.prototype.getDrawInfoList = function() {
		return this._drawInfoList
	}, Fo.prototype._parseObj = function(a) {
		return v(this, void 0, void 0, function() {
			var e, i, o, r, n, s;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return [4, Je.get(a)];
					case 1:
						for (e = t.sent(), i = e.split("\n"), r = 0; r < i.length; r += 1) n = i[r].trim(), /^mtllib /.test(n) &&
							(s = this._parseMtl(this._path + "/" + n.split(" ")[1]), this._mtlPromiseSet.add(s)), /^usemtl /.test(n) &&
							(o = n.split(" ")[1]), this._parseLineData(n, o);
						return [4, Promise.all(this._mtlPromiseSet)];
					case 2:
						return t.sent(), this._generateDrawInfo(), [2]
				}
			})
		})
	}, Fo.prototype._parseMtl = function(r) {
		return v(this, void 0, void 0, function() {
			var e, h, l, i, u, o;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return [4, Je.get(r)];
					case 1:
						e = t.sent(), h = e.split("\n"), l = "material", i = function(e) {
							var i, o, r, n, s, a;
							return x(this, function(t) {
								switch (t.label) {
									case 0:
										return i = h[e].trim(), o = u._materialMap.get(l), /^newmtl /.test(i) && (l = i.split(" ")[1]),
											/^Kd /.test(i) && (r = i.split(" "), n = [Number(r[1]), Number(r[2]), Number(r[3]), 1], o ? o.color =
												n : u._materialMap.set(l, {
													color: n
												})), /^map_Kd /.test(i) ? (s = i.split(" ")[1], (a = new Image).src = u._path + "/" + s, [4, new Promise(
												function(t, e) {
													a.onload = function() {
														t()
													}, a.onerror = function() {
														e()
													}
												})]) : [3, 2];
									case 1:
										t.sent(), o ? o.map = a : u._materialMap.set(l, {
											color: [0, 0, 0, 1],
											map: a
										}), t.label = 2;
									case 2:
										return [2]
								}
							})
						}, u = this, o = 0, t.label = 2;
					case 2:
						return o < h.length ? [5, i(o)] : [3, 5];
					case 3:
						t.sent(), t.label = 4;
					case 4:
						return o += 1, [3, 2];
					case 5:
						return [2]
				}
			})
		})
	}, Fo.prototype._generateDrawInfo = function() {
		var _ = this;
		this._faces.forEach(function(t, e) {
			var i = _._materialMap.get(e);
			if (i) {
				for (var o = [], r = [], n = [], s = [], a = 0; a < t.length; a += 1) {
					var h = _._parseFace(t[a]),
						l = o.length / 3;
					o.push.apply(o, h.vertices), r.push.apply(r, h.normals), n.push.apply(n, h.texCoords);
					for (var u = 0; u < h.indices.length; u += 1) s.push(h.indices[u] + l)
				}
				_._drawInfoList.push({
					vertices: o,
					normals: r,
					indices: s,
					texCoords: n,
					color: i.color,
					map: i.map
				})
			}
		})
	}, Fo.prototype._parseLineData = function(t, e) {
		if (/^v /.test(t)) {
			var i = t.split(" "),
				o = [Number(i[i.length - 3]), Number(i[i.length - 2]), Number(i[i.length - 1])];
			this._vertices.push(o)
		}
		if (/^vn /.test(t)) {
			i = t.split(" ");
			var r = [Number(i[i.length - 3]), Number(i[i.length - 2]), Number(i[i.length - 1])];
			this._normals.push(r)
		}
		if (/^vt /.test(t)) {
			i = t.split(" ");
			var n = [Number(i[i.length - 3]), Number(i[i.length - 2])];
			this._texCoords.push(n)
		}
		if (/^f /.test(t) && e) {
			i = t.split(" ");
			for (var s = [], a = 1; a < i.length; a += 1)
				if (i[a]) {
					var h = i[a].split("/"),
						l = (o = h[0], n = h[1], r = h[2], []),
						u = Number(o);
					u < 0 ? u = this._vertices.length + u : u -= 1, l.push(u);
					var _ = -1;
					n && ((_ = Number(n)) < 0 ? _ = this._texCoords.length + _ : _ -= 1), l.push(_);
					var p = -1;
					r && ((p = Number(r)) < 0 ? p = this._texCoords.length + p : p -= 1), l.push(p), s.push(l)
				} var c = this._faces.get(e);
			c ? c.push(s) : this._faces.set(e, [s])
		}
	}, Fo.prototype._parseFace = function(t) {
		for (var e = [], i = [], o = [], r = [], n = 0; n < t.length; n += 1) {
			var s = t[n],
				a = s[0],
				h = s[1],
				l = s[2];
			i.push.apply(i, this._vertices[a]), this._normals[l] ? r.push.apply(r, this._normals[l]) : r.push(1, 1, 1), this._texCoords[
				h] ? o.push.apply(o, this._texCoords[h]) : o.push(0, 0, 0)
		}
		var u = t.length - 2;
		for (n = 0; n < u; n += 1) e.push(0, n + 1, n + 2);
		return {
			indices: e,
			vertices: i,
			normals: r,
			texCoords: o
		}
	}, Fo.prototype.loaded = function() {
		return !Boolean(this._loadPromise)
	}, Fo.prototype.getLoadPromise = function() {
		return this._loadPromise
	}, Fo);

	function Fo(t) {
		var e = this;
		this._mtlPromiseSet = new Set, this._materialMap = new Map, this._vertices = [], this._normals = [], this._texCoords = [],
			this._faces = new Map, this._drawInfoList = [];
		var i = t.split("/");
		this._path = i.slice(0, -1).join("/"), u(["_generateDrawInfo"], this), this._loadPromise = this._parseObj(t), this._loadPromise
			.then(function() {
				delete e._loadPromise
			})
	}
	var Ao, Vo = (e(No, Ao = xe), No.prototype.queryFeaturesByWorld = function(t, e) {
		if (!this._engine) return [];
		var i = this._engine.getCamera().getOnePixelToWorld();
		return Pe(this._layout, this._features, {
			x: t,
			y: e
		}, i)
	}, No.prototype.getGeometryRenderList = function() {
		return this._geometryRenderList
	}, No.prototype._updateRenderList = function(t) {
		if (this._engine) {
			this._geometryRenderList.length = 0;
			for (var e = t.info, i = 0; i < e.length; i += 1) {
				var o = No.MODEL_LOADER_MAP.get(e[i].url);
				if (o) {
					for (var r = o.getDrawInfoList(), n = [], s = 0; s < r.length; s += 1) {
						var a = new Ro(this._engine.getGl());
						a.update(m(m({}, r[s]), {
							texture: this._engine.getTextureMng().getEmptyTexture()
						})), n.push(m(m({}, e[i]), {
							buffer: a,
							useTexture: Boolean(r[s].map) ? 1 : 0,
							color: r[s].color
						}))
					}
					this._geometryRenderList.push(n)
				}
			}
		}
	}, No.prototype.clear = function() {
		this._geometryRenderList.length = 0, this._features.length = 0
	}, No.prototype.setLayout = function(t) {
		this._layout = m(m({}, this._layout), t), 0 !== this._features.length && this._update()
	}, No.prototype._update = function() {
		var e = this;
		if (this._engine) {
			for (var t = 0; t < this._features.length; t += 1) this._calcPoint(this._features[t]);
			var i = {
					id: this.id,
					type: "model",
					layout: this._layout,
					features: this._features,
					offset: this._engine.getOffset(),
					taskId: this._getTaskId(),
					sync: this.getSync()
				},
				o = this._engine.getBucketMng();
			0 === this._loadPromiseSet.size ? o.update(i) : new Promise(function(t) {
				Promise.all(e._loadPromiseSet).then(t).catch(t)
			}).then(function() {
				o.update(i)
			})
		}
	}, No.prototype._calcPoint = function(t) {
		var e = this,
			i = Rt.getStyle(this._layout, "url", t.properties);
		if (i) {
			var o = No.MODEL_LOADER_MAP.get(i);
			if (o || (o = new Po(i), No.MODEL_LOADER_MAP.set(i, o)), !o.loaded()) {
				var r = o.getLoadPromise();
				r.then(function() {
					return e._loadPromiseSet.delete(r)
				}), this._loadPromiseSet.add(r)
			}
		}
	}, No.DEFAULT_LAYOUT = {
		visible: !0,
		size: 1,
		base: 0,
		opacity: 1,
		rotateX: 0,
		rotateY: 0,
		rotateZ: 0
	}, No.MODEL_LOADER_MAP = new Map, No);

	function No(t) {
		var e = Ao.call(this, "Model", m(m({}, No.DEFAULT_LAYOUT), t)) || this;
		return e._loadPromiseSet = new Set, e._geometryRenderList = [], e
	}
	var Bo, ko = (e(Oo, Bo = Me), Oo.prototype.update = function(t) {
		var e = t.normals;
		this.verticesNum = e.length / 2, this._initArrayBuffer(this._normalsBuffer, e)
	}, Oo.prototype.bind = function(t) {
		this._vertexAttribPointer(t, this._normalsBuffer, 2)
	}, Oo);

	function Oo(t) {
		var e = Bo.call(this, t) || this;
		return e.verticesNum = 0, e._normalsBuffer = e._gl.createBuffer(), e
	}
	var zo, Do = (e(Uo, zo = xe), Uo.prototype.queryFeaturesByWorld = function(t, e) {
		if (!this._engine) return [];
		var i = this._engine.getCamera().getOnePixelToWorld();
		return Pe(this._layout, this._features, {
			x: t,
			y: e
		}, i)
	}, Uo.prototype._updateRenderList = function(t) {
		var e;
		this._geometryRenderList.length = 0;
		var i = t.info;
		(e = this._geometryRenderList).push.apply(e, i)
	}, Uo.prototype.getGeometryRenderList = function() {
		return this._geometryRenderList
	}, Uo.prototype.onAdd = function(t) {
		zo.prototype.onAdd.call(this, t);
		var e = t.getGl();
		this._buffer = new ko(e), this._buffer.update({
			normals: Uo.getCircleNormals()
		})
	}, Uo.prototype.clear = function() {
		this._features.length = 0, this._geometryRenderList.length = 0
	}, Uo.prototype.onRemove = function() {
		zo.prototype.onRemove.call(this), delete this._buffer
	}, Uo.prototype.setLayout = function(t) {
		this._layout = m(m({}, this._layout), t), 0 !== this._features.length && this._update()
	}, Uo.prototype.getBuffer = function() {
		return this._buffer
	}, Uo.prototype._update = function() {
		if (this._engine) {
			var t = {
				type: "circle",
				id: this.id,
				layout: this._layout,
				features: this._features,
				offset: this._engine.getOffset(),
				taskId: this._getTaskId(),
				sync: this.getSync()
			};
			this._engine.getBucketMng().update(t)
		}
	}, Uo.getCircleNormals = function() {
		if (!Uo.CIRCLE_NORMALS) {
			Uo.CIRCLE_NORMALS = [];
			for (var t = new Nt([0, 1]), e = 16 / 180 * Math.PI, i = 2 * Math.PI + e, o = 0; o < i; o += e) {
				var r = o > 2 * Math.PI ? 2 * Math.PI : o,
					n = t.clone().rotate(r);
				Uo.CIRCLE_NORMALS.push(n.x, n.y)
			}
		}
		return Uo.CIRCLE_NORMALS
	}, Uo.DEFAULT_LAYOUT = {
		visible: !0,
		radius: 5,
		color: "#333333",
		base: 0,
		opacity: 1
	}, Uo);

	function Uo(t) {
		var e = zo.call(this, "Circle", m(m({}, Uo.DEFAULT_LAYOUT), t)) || this;
		return e._geometryRenderList = [], e
	}
	var Go, Wo = (e(Zo, Go = Me), Zo.prototype.update = function(t) {
		var e = t.texCoords,
			i = t.texture,
			o = t.vertices;
		this._vertices = o, this._texture = i, this._initArrayBuffer(this._verticesBuffer, o), this._initArrayBuffer(this._texCoordBuffer,
			e)
	}, Zo.prototype.getVertices = function() {
		return this._vertices
	}, Object.defineProperty(Zo.prototype, "verticesNum", {
		get: function() {
			return this._vertices.length / 2
		},
		enumerable: !0,
		configurable: !0
	}), Zo.prototype.bind = function(t, e) {
		this._vertexAttribPointer(t, this._verticesBuffer, 2), this._vertexAttribPointer(e, this._texCoordBuffer, 2), this
			._texture && this._gl.bindTexture(this._gl.TEXTURE_2D, this._texture)
	}, Zo);

	function Zo(t) {
		var e = Go.call(this, t) || this;
		return e._vertices = [], e._verticesBuffer = e._gl.createBuffer(), e._texCoordBuffer = e._gl.createBuffer(), e
	}
	var jo, Yo = (e(Ho, jo = xe), Ho.prototype.clear = function() {
		this._features.length = 0, this._geometryRenderList.length = 0
	}, Ho.prototype.setLayout = function(t) {
		this._layout = m(m({}, this._layout), t), 0 !== this._features.length && this._update()
	}, Ho.prototype.getGeometryRenderList = function() {
		return this._geometryRenderList
	}, Ho.prototype.queryFeaturesByWorld = function(t, e) {
		if (!this._engine) return [];
		for (var i = [], o = this._engine.getOffset(), r = 0; r < this._geometryRenderList.length; r += 1) {
			var n = [t + o[0], e + o[1]],
				s = this._geometryRenderList[r],
				a = s.buffer,
				h = s.rotate,
				l = s.point,
				u = s.index,
				_ = new S(n[0] - l[0], n[1] - l[1]);
			_.rotate(-h / 180 * Math.PI), n = [_.x + l[0], _.y + l[1]];
			var p = a.getVertices();
			Re([
				[
					[p[0], p[1]],
					[p[2], p[3]],
					[p[6], p[7]],
					[p[4], p[5]]
				]
			], n) && i.push(this._features[u])
		}
		return i
	}, Ho.prototype._updateRenderList = function(t) {
		if (this._engine) {
			this._geometryRenderList.length = 0;
			for (var e = this._engine.getTextureMng(), i = t.info, o = 0; o < i.length; o += 1) {
				var r = e.getTexture(i[o].iconUrl, Ho.TEXTURE_PARAMS),
					n = e.getEmptyTexture();
				r && (n = r.texture);
				var s = new Wo(this._engine.getGl());
				s.update({
					vertices: i[o].vertices,
					texCoords: i[o].texCoords,
					texture: n
				}), this._geometryRenderList.push({
					buffer: s,
					base: i[o].base,
					opacity: i[o].opacity,
					point: i[o].point,
					rotate: i[o].rotate,
					index: i[o].index
				})
			}
		}
	}, Ho.prototype._update = function() {
		var i = this;
		if (this._engine) {
			for (var o = [], t = function(e) {
					r._calcPoint(r._features[e], function(t) {
						o.push(m(m({}, i._features[e]), {
							index: e,
							imgSize: t
						}))
					})
				}, r = this, e = 0; e < this._features.length; e += 1) t(e);
			var n = {
					id: this.id,
					layout: this._layout,
					type: "picture",
					features: o,
					offset: this._engine.getOffset(),
					taskId: this._getTaskId(),
					sync: this.getSync()
				},
				s = this._engine.getBucketMng();
			0 === this._loadPromiseSet.size ? s.update(n) : new Promise(function(t) {
				Promise.all(i._loadPromiseSet).then(t).catch(t)
			}).then(function() {
				s.update(n)
			})
		}
	}, Ho.prototype._calcPoint = function(a, h) {
		return v(this, void 0, void 0, function() {
			var e, i, o, r, n, s = this;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return this._engine ? (e = this._engine.getTextureMng(), (i = Rt.getStyle(this._layout, "iconImage", a.properties)) ?
							(o = [0, 0], (r = e.getTexture(i, Ho.TEXTURE_PARAMS)) ? [3, 2] : ((n = e.loadTexture(i, Ho.TEXTURE_PARAMS))
								.then(function() {
									return s._loadPromiseSet.delete(n)
								}), this._loadPromiseSet.add(n), [4, n])) : [2]) : [2];
					case 1:
						r = t.sent(), t.label = 2;
					case 2:
						return o = [r.width, r.height], h(o), [2]
				}
			})
		})
	}, Ho.DEFAULT_LAYOUT = {
		visible: !0,
		size: 1,
		rotate: 0,
		base: 0,
		opacity: 1
	}, Ho.TEXTURE_PARAMS = {
		xRepeat: !1,
		yRepeat: !1
	}, Ho);

	function Ho(t) {
		var e = jo.call(this, "Picture", m(m({}, Ho.DEFAULT_LAYOUT), t)) || this;
		return e._geometryRenderList = [], e._loadPromiseSet = new Set, e
	}
	var qo, Xo = (e(Ko, qo = Me), Ko.prototype.update = function(t) {
		var e = t.normals;
		this.verticesNum = e.length / 2, this._initArrayBuffer(this._normalsBuffer, e)
	}, Ko.prototype.bind = function(t) {
		this._vertexAttribPointer(t, this._normalsBuffer, 2)
	}, Ko);

	function Ko(t) {
		var e = qo.call(this, t) || this;
		return e.verticesNum = 0, e._normalsBuffer = e._gl.createBuffer(), e
	}
	var Qo, Jo = (e($o, Qo = xe), $o.prototype.getGeometryRenderList = function() {
		return this._geometryRenderList
	}, $o.prototype.queryFeaturesByWorld = function(t, e) {
		if (!this._engine) return [];
		var i = this._engine.getCamera().getOnePixelToWorld();
		return Pe(this._layout, this._features, {
			x: t,
			y: e
		}, i)
	}, $o.prototype.getBuffer = function() {
		return this._buffer
	}, $o.prototype.onAdd = function(t) {
		Qo.prototype.onAdd.call(this, t), this._buffer = new Xo(t.getGl());
		var e = $o.getCircleNormals();
		this._buffer.update({
			normals: e
		})
	}, $o.prototype.clear = function() {
		this._features.length = 0, this._geometryRenderList.length = 0
	}, $o.prototype.onRemove = function() {
		Qo.prototype.onRemove.call(this), delete this._buffer
	}, $o.prototype.setLayout = function(t) {
		this._layout = m(m({}, this._layout), t), 0 !== this._features.length && this._update()
	}, $o.prototype._updateRenderList = function(t) {
		var e;
		this._geometryRenderList.length = 0;
		var i = t.info;
		(e = this._geometryRenderList).push.apply(e, i)
	}, $o.prototype._update = function() {
		if (this._engine) {
			var t = {
				id: this.id,
				features: this._features,
				type: "heatmap",
				offset: this._engine.getOffset(),
				layout: this._layout,
				taskId: this._getTaskId(),
				sync: this.getSync()
			};
			this._engine.getBucketMng().update(t)
		}
	}, $o.prototype.getBase = function() {
		return this._layout.base
	}, $o.getCircleNormals = function() {
		if (!$o.CIRCLE_NORMALS) {
			$o.CIRCLE_NORMALS = [0, 0];
			for (var t = new Nt([0, 1]), e = 16 / 180 * Math.PI, i = 2 * Math.PI + e, o = 0; o < i; o += e) {
				var r = o > 2 * Math.PI ? 2 * Math.PI : o,
					n = t.clone().rotate(r);
				$o.CIRCLE_NORMALS.push(n.x, n.y)
			}
		}
		return $o.CIRCLE_NORMALS
	}, $o.DEFAULT_LAYOUT = {
		visible: !0,
		base: 0,
		opacity: 1,
		radius: 30
	}, $o);

	function $o(t) {
		var e = Qo.call(this, "Heatmap", m(m({}, $o.DEFAULT_LAYOUT), t)) || this;
		return e._geometryRenderList = [], e
	}
	var tr, er = (e(ir, tr = Me), ir.prototype.update = function(t) {
		var e = t.vertices,
			i = t.normals,
			o = t.texCoords,
			r = t.texture;
		this.verticesNum = e.length / 3, this._initArrayBuffer(this._verticesBuffer, e), this._initArrayBuffer(this._normalsBuffer,
			i), this._initArrayBuffer(this._texCoordsBuffer, o), this._texture = r
	}, ir.prototype.bind = function(t) {
		var e = t.a_position,
			i = t.a_normal,
			o = t.a_texCoord;
		this._gl.bindTexture(this._gl.TEXTURE_2D, this._texture), this._vertexAttribPointer(e, this._verticesBuffer, 3),
			this._vertexAttribPointer(i, this._normalsBuffer, 2), this._vertexAttribPointer(o, this._texCoordsBuffer, 2)
	}, ir);

	function ir(t) {
		var e = tr.call(this, t) || this;
		return e.verticesNum = 0, e._verticesBuffer = e._gl.createBuffer(), e._normalsBuffer = e._gl.createBuffer(), e._texCoordsBuffer =
			e._gl.createBuffer(), e._texture = e._gl.createTexture(), e
	}
	var or, rr = (e(nr, or = xe), nr.prototype.clear = function() {
		this._geometryRenderList.length = 0
	}, nr.prototype._updateRenderList = function(t) {
		if (this._engine) {
			this._geometryRenderList.length = 0;
			for (var e = this._engine.getTextureMng(), i = t.info, o = 0; o < i.length; o += 1) {
				var r = new er(this._engine.getGl()),
					n = e.getEmptyTexture(),
					s = [0, 0],
					a = i[o].iconUrl;
				if (a) {
					var h = e.getTexture(a, nr.TEXTURE_PARAMS);
					h && (n = h.texture, s = [h.width, h.height])
				}
				r.update({
					vertices: i[o].vertices,
					texCoords: i[o].texCoords,
					normals: i[o].normals,
					texture: n
				}), this._geometryRenderList.push({
					buffer: r,
					color: i[o].color,
					base: i[o].base,
					opacity: i[o].opacity,
					useTexture: Boolean(a),
					width: i[o].width,
					imgSize: s
				})
			}
		}
	}, nr.prototype.setLayout = function(t) {
		this._layout = m(m({}, this._layout), t), 0 !== this._features.length && this._update()
	}, nr.prototype.getGeometryRenderList = function() {
		return this._geometryRenderList
	}, nr.prototype.queryFeaturesByWorld = function(t, e) {
		if (!this._engine) return [];
		var i = this._engine.getCamera().getOnePixelToWorld();
		return Ae(this._layout, this._features, {
			x: t,
			y: e
		}, i)
	}, nr.prototype._update = function() {
		var e = this;
		if (this._engine) {
			for (var t = 0; t < this._features.length; t += 1) this._calcPolyline(this._features[t]);
			var i = this._engine.getBucketMng(),
				o = {
					id: this.id,
					type: "connection",
					features: this._features,
					layout: this._layout,
					offset: this._engine.getOffset(),
					taskId: this._getTaskId(),
					sync: this.getSync()
				};
			0 === this._loadPromiseSet.size ? i.update(o) : new Promise(function(t) {
				Promise.all(e._loadPromiseSet).then(t).catch(t)
			}).then(function() {
				i.update(o)
			})
		}
	}, nr.prototype._calcPolyline = function(t) {
		var e = this;
		if (this._engine) {
			var i = this._engine.getTextureMng(),
				o = Rt.getStyle(this._layout, "icon", t.properties);
			if (o && !i.getTexture(o, nr.TEXTURE_PARAMS)) {
				var r = i.loadTexture(o, nr.TEXTURE_PARAMS);
				this._loadPromiseSet.add(r), r.then(function() {
					return e._loadPromiseSet.delete(r)
				})
			}
		}
	}, nr.DEFAULT_LAYOUT = {
		visible: !0,
		opacity: 1,
		base: 0,
		width: 10,
		color: "#666666"
	}, nr.TEXTURE_PARAMS = {
		xRepeat: !0,
		yRepeat: !0
	}, nr);

	function nr(t) {
		var e = or.call(this, "Connection", m(m({}, nr.DEFAULT_LAYOUT), t)) || this;
		return e._geometryRenderList = [], e._loadPromiseSet = new Set, e
	}
	var sr = (ar.prototype.requestRoadNet = function(o) {
		return v(this, void 0, void 0, function() {
			var e, i = this;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return this._dbMng ? [4, this._dbMng.select("road-net", o)] : [3, 2];
					case 1:
						if (e = t.sent()) return requestAnimationFrame(function() {
							return i._requestRoadNet(o, !0)
						}), [2, e.data];
						t.label = 2;
					case 2:
						return [4, this._requestRoadNet(o, !1)];
					case 3:
						return [2, t.sent()]
				}
			})
		})
	}, ar.prototype._requestRoadNet = function(o, r) {
		return v(this, void 0, void 0, function() {
			var e, i;
			return x(this, function(t) {
				switch (t.label) {
					case 0:
						return e = this._options.server + "/path/" + o, [4, Je.get(e)];
					case 1:
						return i = t.sent(), this._dbMng && (r ? this._dbMng.update("road-net", {
							bdId: o,
							data: i
						}) : this._dbMng.insert("road-net", {
							bdId: o,
							data: i
						})), [2, i]
				}
			})
		})
	}, ar);

	function ar(t) {
		if (this._options = t, window.indexedDB && this._options.useCache) {
			this._dbMng = new Mi("palmap-road-net", {
				tableNames: [{
					name: "road-net",
					keyPath: "bdId"
				}]
			})
		}
	}
	var hr = z(
			'!function(){"use strict";var c=function(){return(c=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function l(){for(var t=0,e=0,o=arguments.length;e<o;e++)t+=arguments[e].length;var r=Array(t),n=0;for(e=0;e<o;e++)for(var i=arguments[e],s=0,a=i.length;s<a;s++,n++)r[n]=i[s];return r}var g=(t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.subtract=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.divide=function(t){return this.x/=t,this.y/=t,this},t.prototype.equal=function(t){return this.x===t.x&&this.y===t.y},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.distanceTo=function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},t.prototype.rotate=function(t){var e=Math.cos(t),o=Math.sin(t),r=e*this.x-o*this.y,n=o*this.x+e*this.y;return this.x=r,this.y=n,this},t.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},t.prototype.getLength=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},t);function t(t,e){this.x=t,this.y=e}var f=(o.prototype.unit=function(){var t=this.getLength();return 0===t?new o([0,0]):new o([0,0],[this.x/t,this.y/t])},o.prototype.normal=function(){return new o([0,0],[-this.y,this.x])},o.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},o.prototype.subtract=function(t){return this.x-=t.x,this.y-=t.y,this},o.prototype.rotate=function(t){var e=Math.cos(t),o=Math.sin(t),r=e*this.x-o*this.y,n=o*this.x+e*this.y;return this.x=r,this.y=n,this},o.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},o.prototype.dot=function(t){return this.x*t.x+this.y*t.y},o.prototype.angleTo=function(t){var e=this.getLength()*t.getLength();if(0==e)return 0;var o=(this.x*t.x+this.y*t.y)/e;1<o?o=1:o<-1&&(o=-1);var r=Math.acos(o)/Math.PI*180;return(this.cross(t)<0?1:-1)*r},o.prototype.cross=function(t){return this.x*t.y-t.x*this.y},o.prototype.clone=function(){return new o([0,0],[this.x,this.y])},o.prototype.multiplyMat4=function(t){var e=t.getValue();return new o([e[0]*this.x+e[4]*this.y+e[12],e[1]*this.x+e[5]*this.y+e[13]])},o.prototype.getLength=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},o);function o(t,e){e?(this.x=e[0]-t[0],this.y=e[1]-t[1]):(this.x=t[0],this.y=t[1])}var s=(a.prototype.getVector2=function(){var t=this._end.x-this._start.x,e=this._end.y-this._start.y;return new f([t,e])},a.prototype.getLength=function(){return this._start.distanceTo(this._end)},a.prototype.getClosest=function(t){var e=t.x,o=t.y,r=new g(e,o),n=this.getVector2(),i=n.x,s=n.y,a=this._start,h=a.x,d=a.y,u=this._end,p=u.x,c=u.y;if(0===this.getLength())return{distance:r.distanceTo(this._start),coordinate:{x:h,y:d}};var l,f=(i*s*e-i*s*h+s*s*o+i*i*d)/(s*s+i*i);if(l=0===i?(s*h+i*f-i*d)/s:(i*e-s*f+s*o)/i,this._checkIsInSegment(l,f))return{distance:new g(l,f).distanceTo(r),coordinate:{x:l,y:f}};var _=r.distanceTo(this._start),y=r.distanceTo(this._end);return _<y?{distance:_,coordinate:{x:h,y:d}}:{distance:y,coordinate:{x:p,y:c}}},a.prototype.getStart=function(){return this._start},a.prototype.getEnd=function(){return this._end},a.prototype._checkIsInSegment=function(t,e){var o=Math.max(this._start.x,this._end.x)+a.PRECISION,r=Math.min(this._start.x,this._end.x)-a.PRECISION,n=Math.max(this._start.y,this._end.y)+a.PRECISION,i=Math.min(this._start.y,this._end.y)-a.PRECISION;return r<=t&&t<=o&&i<=e&&e<=n},a.PRECISION=1e-8,a);function a(t,e){this._start=new g(t[0],t[1]),this._end=new g(e[0],e[1])}var e=(r.getId=function(t){return void 0===t&&(t="nag"),t+"-"+(r.id+=1)},r.id=0,r);function r(){}var p=(n.prototype.getData=function(){return{altitude:this._altitude,doorId:this._doorId,escalatorId:this._escalatorId,facility:this._facility,floorId:this._floorId,nodeId:this._nodeId,shape:this._shape}},n.prototype.getAltitude=function(){return this._altitude},n.prototype.getDoorId=function(){return this._doorId},n.prototype.getEscalatorId=function(){return this._escalatorId},n.prototype.getFacility=function(){return this._facility},n.prototype.getFloorId=function(){return this._floorId},n.prototype.getNodeId=function(){return this._nodeId},n.prototype.getCoordinates=function(){return this._shape.coordinates},n.prototype.setParent=function(t){this._parent=t},n.prototype.setG=function(t){this._g=t},n.prototype.getG=function(){return this._g},n.prototype.setH=function(t){this._h=t},n.prototype.getH=function(){return this._h},n.prototype.getParent=function(){return this._parent},n.prototype.getPoint=function(){return this._point},n.prototype.equal=function(t){return this._point.equal(t._point)&&this._floorId===t._floorId},n.prototype.distanceTo=function(t){return this._point.distanceTo(t._point)},n.prototype.getPaths=function(){return this._loader.getPathsByFloor(this._floorId)[this._nodeId]||[]},n.prototype.getConnections=function(){return this._loader.getConnectionsByFloor(this._floorId)[this._nodeId]||[]},n.prototype.findPath=function(t){var e=this._loader.getPathsByFloor(this._floorId)[this._nodeId];if(e)for(var o=0;o<e.length;o+=1)if(e[o].getTo().equal(t))return e[o]},n.prototype.findConnection=function(t){var e=this._loader.getConnectionsByFloor(this._floorId)[this._nodeId];if(e)for(var o=0;o<e.length;o+=1)if(e[o].getTo().equal(t))return e[o]},n.prototype.clone=function(){return new n({altitude:this._altitude,doorId:this._doorId,escalatorId:this._escalatorId,facility:this._facility,floorId:this._floorId,nodeId:e.getId(),shape:{type:"Point",coordinates:[this._point.x,this._point.y]}},this._loader)},n.prototype.setCoordinate=function(t){return this._shape.coordinates=[t.x,t.y],this._point=new g(t.x,t.y),this},n.deepEach=function(t,e){e(t);var o=t.getParent();o&&n.deepEach(o,e)},n);function n(t,e){this._g=0,this._h=0,this._altitude=t.altitude,this._doorId=t.doorId,this._escalatorId=t.escalatorId,this._facility=t.facility,this._floorId=t.floorId,this._nodeId=t.nodeId,this._shape=t.shape;var o=t.shape.coordinates;this._point=new g(o[0],o[1]),this._loader=e}var v=(i.prototype.getFloorAddress=function(){return this._floorAddress},i.prototype.getAltitude=function(){return this._altitude},i.prototype.getAttribute=function(){return this._attribute},i.prototype.getDirection=function(){return this._direction},i.prototype.getFloorId=function(){return this._floorId},i.prototype.getFrom=function(){return this._from},i.prototype.getTo=function(){return this._to},i.prototype.splitPath=function(t,e){this._to=t;for(var o=this._shape.coordinates,r=[],n=0;n<e+1;n+=1)r.push(o[n]);for(r.push(t.getCoordinates()),this._shape={type:"LineString",coordinates:r},this._lines.length=0,n=this._weight=0;n<r.length-1;n+=1){var i=new s(r[n],r[n+1]);this._weight+=i.getLength(),this._lines.push(i)}},i.prototype.getClosest=function(t){for(var e=this._lines[0].getClosest(t),o=c(c({},e),{index:0}),r=1;r<this._lines.length;r+=1){var n=this._lines[r].getClosest(t);n.distance<o.distance&&(o=c(c({},n),{index:r}))}return o},i.prototype.equalFrom=function(t){var e=this._from.getCoordinates();return e[0]===t.x&&e[1]===t.y},i.prototype.equalTo=function(t){var e=this._to.getCoordinates();return e[0]===t.x&&e[1]===t.y},i.prototype.getWeight=function(){return this._weight},i.prototype.getCoordinates=function(){return this._shape.coordinates},i.prototype.toLineJson=function(){for(var t=this._shape.coordinates,e=[],o=new f([0,1]),r=0,n=t.length-1;r<n;r+=1){var i=new f(t[r],t[r+1]);e.push({geometry:[t[r],t[r+1]],angle:i.angleTo(o),length:i.getLength(),floor:this._floorId})}return e},i.prototype.reverse=function(){return new i({altitude:this._altitude,attribute:this._attribute,direction:this._direction,floorId:this._floorId,from:this._to.getData(),shape:{type:"LineString",coordinates:Array.from(this.getCoordinates()).reverse()},to:this._from.getData()},this._loader)},i);function i(t,e){this._lines=[],this._loader=e,this._altitude=t.altitude,this._attribute=t.attribute,this._direction=t.direction,this._floorId=t.floorId,this._from=new p(t.from,e),this._shape=c({},t.shape),this._to=new p(t.to,e);for(var o=t.shape.coordinates,r=this._weight=0;r<o.length-1;r+=1){var n=new s(o[r],o[r+1]);this._weight+=n.getLength(),this._lines.push(n)}this._floorAddress=t.floorId.slice(-3)}var h={1:{category:25136,name:"电梯"},2:{category:25135,name:"扶梯"},3:{category:25135,name:"双向扶梯"},4:{category:25134,name:"楼梯"},5:{category:25137,name:"建筑物出口"},6:{category:25147,name:"坡道"},7:{category:25147,name:"坡道"}},_={elevator:[1],escalator:[2,3],stair:[4],ramp:[6,7],shortest:null},y=(d.prototype.getFrom=function(){return this._from},d.prototype.getTo=function(){return this._to},d.prototype.getCategory=function(){return this._category},d.prototype.getType=function(){return this._type},d.prototype.reverse=function(){return new d({direction:this._direction,from:this._to.getData(),fromEscalatorId:this._toEscalatorId,fromFloorId:this._toFloorId,to:this._from.getData(),toEscalatorId:this._fromEscalatorId,toFloorId:this._fromFloorId,type:this._type},this._loader)},d);function d(t,e){this._direction=t.direction,this._from=new p(t.from,e),this._fromEscalatorId=t.fromEscalatorId,this._fromFloorId=t.fromFloorId,this._to=new p(t.to,e),this._toEscalatorId=t.toEscalatorId,this._toFloorId=t.toFloorId,this._type=t.type,this._category=h[t.type].category,this._loader=e}function u(t,e){for(var o=e[0],r=e[1],n=!1,i=0;i<t.length;i+=1){var s=t[i],a=s.length;s[0][0]===s[a-1][0]&&s[0][1]===s[a-1][1]&&(s=s.slice(0,a-1));for(var h=0,d=s.length,u=d-1;h<d;u=h,h++){var p=s[h][0],c=s[h][1],l=s[u][0],f=s[u][1];if(p===o&&c===r||l===o&&f===r)return!0;if(c<r&&r<=f||r<=c&&f<r){var _=p+(r-c)*(l-p)/(f-c);if(_===o)return!0;o<_&&(n=!n)}}}return n}function I(t,e){for(var o=0;o<e.length;o+=1){if(!u(t,e[o]))return!1}return!0}var x=(C.prototype.setRecommendType=function(t){this._recommendType=t?new Set(t):null,this._connections={},this._initConnections()},C.prototype._initConnections=function(){for(var t=this._data.connections,e=0;e<t.length;e+=1){var o=t[e],r=o.fromFloorId,n=o.from,i=o.to,s=o.direction,a=o.toFloorId,h=o.type;if(n&&i&&this._checkType(h)){var d=new y(t[e],this);this._connections[r]||(this._connections[r]={});var u=this._connections[r][n.nodeId];if(u?u.push(d):(u=[d],this._connections[r][n.nodeId]=u),"TWOWAY"===s){var p=d.reverse();this._connections[a]||(this._connections[a]={});var c=this._connections[a][i.nodeId];c?c.push(p):(c=[p],this._connections[a][i.nodeId]=c)}}}},C.prototype._checkType=function(t){return!this._recommendType||this._recommendType.has(t)},C.prototype._initPaths=function(){for(var t=this._data.roads,e=0;e<t.length;e+=1){var o=t[e],r=o.floorId,n=o.paths;this._paths[r]||(this._paths[r]={});for(var i=0;i<n.length;i+=1){var s=n[i],a=s.from,h=s.to,d=s.direction,u=new v(n[i],this);if(this._paths[r][a.nodeId]?this._paths[r][a.nodeId].push(u):this._paths[r][a.nodeId]=[u],"TWOWAY"===d){var p=u.reverse();this._paths[r][h.nodeId]?this._paths[r][h.nodeId].push(p):this._paths[r][h.nodeId]=[p]}}}},C.prototype.getClosestVertex=function(t,e){var o=this.getPathsByFloor(t.floorId);if(o){if(e){var r=this._getAreaPath(o,e,t.coordinate),n=r.path,i=r.closestResult;if(n&&i)return this._genVertexByPath(n,i,o);var s=this._getVertexByDoorIds(t.floorId,e.doorIds);if(s)return s}var a=this._getClosestResult(o,t.coordinate);if(a){var h=o[a.id][a.index],d={coordinate:a.coordinate,index:a.childIndex,distance:a.distance};return this._genVertexByPath(h,d,o)}}},C.prototype._getVertexByDoorIds=function(t,e){for(var o=this._vertexes[t]||[],r=0;r<o.length;r+=1)if(-1!==e.indexOf(o[r].getDoorId()))return o[r]},C.prototype._genVertexByPath=function(t,e,o){var r;if(t.equalFrom(e.coordinate))r=t.getFrom();else if(t.equalTo(e.coordinate))r=t.getTo();else{r=t.getFrom().clone().setCoordinate(e.coordinate);for(var n=[],i=o[t.getTo().getNodeId()],s=0;s<i.length;s+=1)if(i[s].getTo().equal(t.getFrom())){var a=i[s].getCoordinates().length-e.index-2;i[s].splitPath(r,a),n.push(i[s].reverse())}t.splitPath(r,e.index),n.push(t.reverse()),o[r.getNodeId()]=n}return r},C.prototype._getAreaPath=function(t,e,o){var r,n;for(var i in t)for(var s=t[i],a=0;a<s.length;a+=1){var h=s[a].getCoordinates();if(I(e.coordinates,h)){var d=s[a].getClosest(o);(!n||d.distance<n.distance)&&(r=s[a],n=d)}}return{path:r,closestResult:n}},C.prototype._getClosestResult=function(t,e){var o;for(var r in t){for(var n=t[r],i=n[0].getClosest(e),s=0,a=1;a<n.length;a+=1){var h=n[a].getClosest(e);h.distance<i.distance&&(i=h,s=a)}(!o||i.distance<o.distance)&&(o={id:r,distance:i.distance,coordinate:i.coordinate,index:s,childIndex:i.index})}return o},C.prototype.reset=function(){this._paths={},this._initPaths()},C.prototype.getPathsByFloor=function(t){return this._paths[t]||{}},C.prototype.getConnectionsByFloor=function(t){return this._connections[t]||{}},C);function C(t){this._connections={},this._paths={},this._vertexes={},this._recommendType=null;for(var e=(this._data=t).roads,o=0;o<e.length;o+=1){var r=e[o],n=r.vertexes,i=r.floorId,s=this._vertexes[i];s||(s=[],this._vertexes[i]=s);for(var a=0;a<n.length;a+=1){var h=new p(n[a],this);s.unshift(h)}}}var m=(T.prototype.G=function(t,e,o){var r,n=t.getParent();if(n&&(r=n.findPath(t)||n.findConnection(t)),e instanceof v)return e.getWeight()+T.calcTurnCost(r,e);if(e instanceof y){if(o)return T.COST_CONN_UNREACH;var i=Math.abs(e.getFrom().getAltitude()-e.getTo().getAltitude());switch(e.getType()){case 1:return r instanceof y?(i-T.BASIC_FLOOR_HEIGHT)*T.COST_CONN_CONTINUOUS_ELEVATOR:i<=T.BASIC_FLOOR_HEIGHT?i/T.BASIC_FLOOR_HEIGHT*T.COST_CONN_ELEVATOR:T.COST_CONN_ELEVATOR+(i/T.BASIC_FLOOR_HEIGHT-1)*T.COST_CONN_CONTINUOUS_ELEVATOR;case 4:return i/T.BASIC_FLOOR_HEIGHT*T.COST_CONN_STAIR;default:return i/T.BASIC_FLOOR_HEIGHT*T.COST_CONN_OTHER}}return 0},T.calcTurnCost=function(t,e){var o=[];if(t instanceof v){var r=t.getCoordinates();o.push(r[r.length-2])}if(o.push.apply(o,e.getCoordinates()),o.length<3)return 0;for(var n=0,i=0;i<o.length-2;i+=1){var s=o[i],a=s[0],h=s[1],d=o[i+1],u=d[0],p=d[1],c=o[i+2],l=c[0],f=(p-h)/(u-a),_=(c[1]-p)/(l-u),y=Math.atan(f),g=Math.atan(_);n+=.5*Math.abs(g-y)}return n},T.COST_CONN_ELEVATOR=90,T.COST_CONN_CONTINUOUS_ELEVATOR=20,T.COST_CONN_STAIR=170,T.COST_CONN_OTHER=60,T.COST_CONN_UNREACH=1e3,T.BASIC_FLOOR_HEIGHT=5,T);function T(){}var O=(w.prototype.H=function(t,e){return Math.abs(t.getAltitude()-e.getAltitude())+t.distanceTo(e)},w);function w(){}var N=(S.prototype.add=function(t){this._values.push(t),this._keyMap[t.getNodeId()]=this._values.length-1},S.prototype.delete=function(t){var e=this._keyMap[t.getNodeId()];if("number"==typeof e){delete this._keyMap[t.getNodeId()],this._values.splice(e,1);for(var o=e;o<this._values.length;o+=1)this._keyMap[this._values[o].getNodeId()]=o}},S.prototype.has=function(t){return"number"==typeof this._keyMap[t.getNodeId()]},S.prototype.getValues=function(){return this._values},S.prototype.size=function(){return this._values.length},S.prototype.getById=function(t){var e=this._keyMap[t];if("number"==typeof e)return this._values[e]},S);function S(t){if(this._values=[],this._keyMap={},t){this._values=t;for(var e=0;e<this._values.length;e+=1)this._keyMap[this._values[e].getNodeId()]=e}}var F,P=(E.prototype.calculate=function(t,e,o,r,n){this._loader.reset();var i=E.getContainPolygon(e,t.coordinate),s=this._loader.getClosestVertex(t,i),a=E.getContainPolygon(r,o.coordinate),h=this._loader.getClosestVertex(o,a);if(!s||!h)return[];var d=[];if(t.floorId===o.floorId)this._loader.setRecommendType(null),(p=this._aStar(s,h))&&d.push({strategy:"shortest",route:{type:"FeatureCollection",features:this._normalizeResult(p)}});else for(var u=0;u<n.length;u+=1){var p,c=_[n[u]];this._loader.setRecommendType(c),(p=this._aStar(s,h))&&d.push({strategy:n[u],route:{type:"FeatureCollection",features:this._normalizeResult(p)}})}return d},E.prototype._aStar=function(t,e){var o=new N([t]),r=new N;t:for(;0!==o.size();){var n=E.getLowerGAndHVertex(o.getValues());if(o.delete(n),r.add(n),n.equal(e)){r.add(n);break}for(var i=l(n.getPaths(),n.getConnections()),s=0;s<i.length;s+=1){var a=i[s].getTo();if(a.equal(e)){a.setParent(n),r.add(a);break t}if(!r.has(a)){var h=this._g.G(n,i[s],t.getFloorId()===e.getFloorId())+n.getG(),d=this._h.H(a,e);o.has(a)?h+d<(a=o.getById(a.getNodeId())).getG()+a.getH()&&(a.setG(h),a.setH(d),a.setParent(n),o.delete(a),o.add(a)):(a.setG(h),a.setH(d),a.setParent(n),o.add(a))}}}var u=r.getValues(),p=u[u.length-1];return p&&p.equal(e)?E.genLineString(p):null},E.prototype._isCanConcat=function(t,e){var o=this._options,r=o.maxAngleDiff,n=o.minLineLength;return t<r||e<n},E.prototype._normalizeResult=function(t){if(0===t.length)return[];for(var e=t[0].angle,o=[{type:"Feature",geometry:{type:"LineString",coordinates:t[0].geometry},properties:t[0].properties}],r=1;r<t.length;r+=1){var n=Math.abs(t[r].angle-e),i=o[o.length-1],s=t[r],a=s.properties,h=s.length;if(a.floor===i.properties.floor&&this._isCanConcat(n,h)){i.geometry.coordinates[1]=t[r].geometry[1],i.properties=c(c({},i.properties),a);var d=i.geometry.coordinates,u=d[0],p=d[1];e=new f(u,p).angleTo(new f([0,1]))}else e=t[r].angle,o.push({type:"Feature",geometry:{type:"LineString",coordinates:t[r].geometry},properties:a})}return o},E.genLineString=function(t){var d,u=[];return p.deepEach(t,function(t){var e=t.getParent();if(e){var o=e.findPath(t),r=e.getParent(),n=r&&r.findConnection(e)||d&&t.findConnection(d);if(o){for(var i=o.toLineJson(),s=[],a=0;a<i.length;a+=1){var h={floor:i[a].floor,altitude:o.getAltitude(),floorAddress:o.getFloorAddress(),pathType:""};n&&(h.category=n.getCategory()),s.push(c(c({},i[a]),{properties:h}))}u.unshift.apply(u,s)}}d=t}),u},E.getLowerGAndHVertex=function(t){for(var e=t[0].getG()+t[0].getH(),o=0,r=1;r<t.length;r+=1){var n=t[r].getG()+t[r].getH();n<e&&(e=n,o=r)}return t[o]},E.getContainPolygon=function(t,e){for(var o=t.length-1;0<=o;o-=1){var r=t[o],n=r.geometry,i=r.properties;if("Polygon"===n.type){if(u(n.coordinates,[e.x,e.y]))return{coordinates:n.coordinates,doorIds:(i||{}).doorIds||[]}}else if("MultiPolygon"===n.type)for(var s=0;s<n.coordinates.length;s+=1)if(u(n.coordinates[s],[e.x,e.y]))return{coordinates:n.coordinates[s],doorIds:(i||{}).doorIds||[]}}},E);function E(t,e){this._options=e,this._loader=new x(t),this._g=new m,this._h=new O}onmessage=function(t){var e=t.data;if("init"===e.type){var o=e;F=F||new P(o.roadData,o.options)}else if("calculate"===e.type){o=e;var r=[];F&&(r=F.calculate(o.start,o.startShop,o.end,o.endShop,o.strategies)),postMessage(r)}}}();\n'
		),
		lr = {
			server: "https://path.ipalmap.com",
			useCache: !0
		},
		ur = (_r.prototype._init = function() {
			return v(this, void 0, void 0, function() {
				var e, i;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return [4, this._res.requestRoadNet(this._options.bdId)];
						case 1:
							return e = t.sent(), this._roadNetData = e, i = {
								type: "init",
								roadData: e,
								options: {
									maxAngleDiff: 3,
									minLineLength: .3
								}
							}, this._worker.postMessage(i), [2]
					}
				})
			})
		}, _r.prototype.getData = function() {
			return this._roadNetData
		}, _r.prototype.getLoadedPromise = function() {
			return this._loadPromise
		}, _r.prototype.loaded = function() {
			return !this._loadPromise
		}, _r.prototype.calculate = function(r, n, s) {
			return v(this, void 0, Promise, function() {
				var e, i, o;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return [4, this._mapView.getPlanarGraph(r.floorId)];
						case 1:
							return e = t.sent().shop, [4, this._mapView.getPlanarGraph(n.floorId)];
						case 2:
							return i = t.sent().shop, o = {
								type: "calculate",
								start: r,
								end: n,
								strategies: s,
								startShop: e,
								endShop: i
							}, this._dataPromise ? [4, this._dataPromise] : [3, 4];
						case 3:
							t.sent(), t.label = 4;
						case 4:
							return [2, this._calculate(o)]
					}
				})
			})
		}, _r.prototype._calculate = function(t) {
			var e = this;
			return this._worker.postMessage(t), this._dataPromise = new Promise(function(t) {
				e._dataResolve = t
			}), this._dataPromise
		}, _r);

	function _r(t, e) {
		var i = this;
		this._worker = new hr, this._mapView = t, this._options = m(m({}, lr), e), this._res = new sr({
			server: this._options.server,
			useCache: this._options.useCache
		}), this._loadPromise = this._init(), this._loadPromise.then(function() {
			return delete i._loadPromise
		}), this._worker.addEventListener("message", function(t) {
			var e = t.data;
			i._dataResolve && (i._dataResolve(e), delete i._dataResolve, delete i._dataPromise)
		})
	}
	var pr = {
			isFillet: !1,
			filletNumber: 4,
			filletDistance: 3,
			multilineOpacity: .8
		},
		cr = (fr.prototype._onChangeViewType = function() {
			"single" === this._mapView.getViewType() ? this._removeConnectionLayers() : (this._addConnectionLayers(), this.hasNavi() &&
					this._mapView.highlightFloor(this._floorOrder)), this._removeLineLayers(), this._addLineLayers(this._mapView.currentFloor),
				this._removeMultiLineLayers(), this._isShowMultiline && this._addMultiLineLayers(this._mapView.currentFloor)
		}, fr.prototype.getFloorOrder = function() {
			return this._floorOrder
		}, fr.prototype._onChangeFloor = function(t) {
			this._activeRoute && "multiple" !== this._mapView.getViewType() && (this._removeLineLayers(), this._addLineLayers(
				t), this._removeMultiLineLayers(), this._isShowMultiline && this._addMultiLineLayers(t))
		}, fr.prototype.getNaviBounds = function() {
			if (this._activeRoute) {
				for (var t, e, i, o, r = this._activeRoute, n = 0; n < r.length; n += 1) {
					var s = r[n],
						a = s.geometry.coordinates;
					if (s.properties.floor === this._mapView.currentFloor)
						for (var h = 0; h < a.length; h += 1) {
							var l = a[h],
								u = l[0],
								_ = l[1];
							t = t ? u < t ? u : t : u, e = e ? _ < e ? _ : e : _, i = i ? i < u ? u : i : u, o = o ? o < _ ? _ : o : _
						}
				}
				if (t && e && i && o) return {
					topLeft: {
						x: t,
						y: o
					},
					bottomRight: {
						x: i,
						y: e
					}
				}
			}
		}, fr.prototype.renderNavi = function(f, g) {
			return v(this, void 0, void 0, function() {
				var e, i, o, r, n, s, a, h, l, u, _, p, c;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return e = f.floorId, i = f.coordinate, o = g.floorId, r = g.coordinate, n = this._options, s = n.server,
								a = n.strategies, h = n.isFillet, l = n.filletDistance, u = n.filletNumber, _ = this._activeRouteType ? [
									this._activeRouteType
								] : a, e === o && (_ = ["shortest"]), this._roadCalc && this._roadCalc.loaded() ? [4, this._roadCalc.calculate(
									f, g, _)] : [3, 2];
						case 1:
							return p = t.sent(), [3, 4];
						case 2:
							return [4, Je.post(s, {
								json: {
									from_floor: e,
									from_x: i.x,
									from_y: i.y,
									to_floor: o,
									to_x: r.x,
									to_y: r.y,
									strategies: _,
									isFillet: h,
									filletDistance: l,
									filletNumber: u
								}
							})];
						case 3:
							c = t.sent(), p = c.data, t.label = 4;
						case 4:
							if (!p || 0 === p.length) throw new Error("renderNavi: 规划路线失败！");
							return this._routesArray = p, this.setActiveRoute(this._routesArray[0].strategy), [2]
					}
				})
			})
		}, fr.prototype.setActiveRoute = function(e) {
			var t = this._routesArray.find(function(t) {
				return t.strategy === e
			});
			if (t) {
				this._activeRouteType = e, this._activeRoute = t.route.features, this._floorOrder.length = 0;
				for (var i = this._activeRoute, o = new Map, r = 0; r < i.length; r += 1) o.get(i[r].properties.floor) || (this._floorOrder
					.push(i[r].properties.floor), o.set(i[r].properties.floor, !0));
				var n = this._mapView.currentFloor;
				this._removeLineLayers(), this._addLineLayers(n), this._removeMultiLineLayers(), this._addMultiLineLayers(n),
					"multiple" === this._mapView.getViewType() && (this._removeConnectionLayers(), this._addConnectionLayers(), this
						._mapView.highlightFloor(this._floorOrder));
				var s = this._mapView.getEngine();
				s && s.render()
			} else console.error(e + " is not exit")
		}, fr.prototype.getRoutes = function() {
			if (!this._activeRoute) return [];
			for (var t = this._activeRoute, e = [], i = 0; i < t.length; i += 1) {
				var o = t[i],
					r = o.geometry.coordinates,
					n = r[0],
					s = r[1],
					a = o.properties;
				e.push({
					line: [new S(n[0], n[1]), new S(s[0], s[1])],
					floor: a.floor
				})
			}
			return e
		}, fr.prototype.setWalked = function(t, e, i) {
			if ("multiple" !== this._mapView.getViewType()) {
				var o = this._lineLayers && this._lineLayers[0];
				if (this._activeRoute && o) {
					var r = this._activeRoute;
					if (!(i < 0 || i >= r.length)) {
						var n = r.slice(i + 1),
							s = r[i].geometry.coordinates;
						n.unshift({
							type: "Feature",
							properties: r[i].properties,
							geometry: {
								type: "LineString",
								coordinates: [
									[e.x, e.y], s[1]
								]
							}
						});
						var a = fr.processFeatures(n, t);
						if (0 !== a.length && (o.setFeatures(a), o.setFloorId(t), this._mapView.updateLayer(o)), this._grayLayer) {
							var h = r.slice(0, i);
							h.push({
								type: "Feature",
								properties: r[i].properties,
								geometry: {
									type: "LineString",
									coordinates: [s[0],
										[e.x, e.y]
									]
								}
							});
							var l = fr.processFeatures(h, t);
							0 !== l.length && (this._grayLayer.setFeatures(l), this._grayLayer.setFloorId(t), this._mapView.updateLayer(
								this._grayLayer))
						}
					}
				}
			} else console.error("setWalked: multiple is not support")
		}, fr.prototype.setAllWalked = function() {
			if (this._grayLayer && this._activeRoute && this._mapView.currentFloor) {
				var t = fr.processFeatures(this._activeRoute, this._mapView.currentFloor);
				this._grayLayer.setFeatures(t), this._grayLayer.setFloorId(this._mapView.currentFloor), this._mapView.updateLayer(
					this._grayLayer)
			}
			this._removeLineLayers()
		}, fr.prototype.getActiveRoute = function() {
			return this._activeRoute
		}, fr.prototype._getFloorStop = function(t, e, i) {
			if (t === e) return [];
			var o = Array.from(this._mapView.getFloors());
			i < 0 && o.reverse();
			for (var r = [t], n = !1, s = 0; s < o.length && o[s].flId !== e; s += 1) n && r.push(o[s].flId), o[s].flId === t &&
				(n = !0);
			return r
		}, fr.prototype._addConnectionLayers = function() {
			if (this._activeRoute) {
				this._connectionLayers || (this._connectionLayers = []);
				var t = this._activeRoute;
				if (0 !== t.length) {
					for (var e = t[0].properties.floor, i = 1; i < t.length; i += 1)
						if (t[i].properties.floor !== e) {
							for (var o = this._mapView.getFloorHeight(e), r = this._mapView.getFloorHeight(t[i].properties.floor), n = t[i -
									1].geometry.coordinates[1], s = t[i].geometry.coordinates[0], a = this._getFloorStop(e, t[i].properties.floor,
									r - o), h = 0; h < a.length; h += 1) {
								var l = this._mapView.getFloorHeight(a[h]),
									u = this._mapView.getFloorHeight(a[h + 1] || t[i].properties.floor) - l,
									_ = {
										type: "Feature",
										geometry: {
											type: "LineString",
											coordinates: [
												[n[0], n[1], 0],
												[s[0], s[1], u]
											]
										},
										properties: {}
									},
									p = this._createConnectionLayer(a[h], [_]);
								this._connectionLayers.push(p)
							}
							e = t[i].properties.floor
						} this._mapView.addLayers(this._connectionLayers)
				}
			}
		}, fr.prototype._createConnectionLayer = function(t, e) {
			var i = new rr({
				width: this._options.lineWidth,
				icon: this._options.lineImage,
				base: this._options.lineHeight
			});
			return i.setFloorId(t), i.setFeatures(e), i.setIgnoreMultiFade(!0), i
		}, fr.prototype._createLineLayer = function(t, e, i) {
			var o = new xo({
				lineWidth: this._options.lineWidth,
				lineImage: this._options.lineImage,
				opacity: i,
				base: this._options.lineHeight
			});
			return o.setSync(!0), o.setFloorId(t), o.setFeatures(e), o.setIgnoreMultiFade(!0), o
		}, fr.prototype._addLineLayers = function(t) {
			if (this._activeRoute) {
				var e = this._activeRoute;
				if (this._lineLayers || (this._lineLayers = []), "multiple" === this._mapView.getViewType()) {
					for (var i = 0; i < this._floorOrder.length; i += 1)
						if (0 !== (r = fr.processFeatures(e, this._floorOrder[i])).length) {
							var o = this._createLineLayer(this._floorOrder[i], r, 1);
							this._lineLayers.push(o)
						}
				} else {
					var r;
					if (0 === (r = fr.processFeatures(e, t)).length) return;
					o = this._createLineLayer(t, r, 1), this._lineLayers.push(o)
				}
				this._mapView.addLayers(this._lineLayers)
			}
		}, fr.prototype._addMultiLineLayers = function(t) {
			if (!(this._routesArray.length < 2)) {
				if (this._multilineLayers || (this._multilineLayers = []), "multiple" === this._mapView.getViewType()) {
					for (var e = 0; e < this._floorOrder.length; e += 1)
						if (0 !== (o = this._getOtherFeatures(this._floorOrder[e])).length) {
							var i = this._createLineLayer(this._floorOrder[e], o, this._options.multilineOpacity);
							this._multilineLayers.push(i)
						}
				} else {
					var o;
					if (0 === (o = this._getOtherFeatures(t)).length) return;
					i = this._createLineLayer(t, o, this._options.multilineOpacity), this._multilineLayers.push(i)
				}
				this._mapView.addLayers(this._multilineLayers)
			}
		}, fr.prototype._getOtherFeatures = function(t) {
			for (var e = [], i = 0; i < this._routesArray.length; i += 1)
				if (this._routesArray[i].strategy !== this._activeRouteType) {
					var o = this._routesArray[i].route.features;
					e = e.concat(fr.processFeatures(o, t))
				} return e
		}, fr.prototype.getRestLines = function(t) {
			if (!this._lineLayers || 0 === this._lineLayers.length || this._lineLayers[0].getFloorId() !== t) return [];
			var e = this._lineLayers[0].getFeatures();
			if (0 === e.length) return [];
			var i = e[0].geometry;
			return "LineString" === i.type ? i.coordinates : "MultiLineString" === i.type ? i.coordinates[0] : []
		}, fr.prototype.getActiveRouteType = function() {
			return this._activeRouteType
		}, fr.prototype.getAllRouteType = function() {
			for (var t = [], e = 0; e < this._routesArray.length; e += 1) t.push(this._routesArray[e].strategy);
			return t
		}, fr.prototype.setIsShowMultiline = function(t) {
			this._isShowMultiline = t, this._mapView.currentFloor && (this._removeLineLayers(), this._removeGrayLayer(), this._addLineLayers(
				this._mapView.currentFloor), this._removeMultiLineLayers(), this._isShowMultiline && this._addMultiLineLayers(
				this._mapView.currentFloor))
		}, fr.prototype.hasNavi = function() {
			return Boolean(this._lineLayers)
		}, fr.prototype._removeLineLayers = function() {
			this._lineLayers && (this._mapView.removeLayers(this._lineLayers), delete this._lineLayers)
		}, fr.prototype._removeGrayLayer = function() {
			this._grayLayer && this._mapView.removeLayer(this._grayLayer)
		}, fr.prototype._removeMultiLineLayers = function() {
			this._multilineLayers && (this._mapView.removeLayers(this._multilineLayers), delete this._multilineLayers)
		}, fr.prototype._removeConnectionLayers = function() {
			this._connectionLayers && (this._mapView.removeLayers(this._connectionLayers), delete this._connectionLayers)
		}, fr.prototype.removeLayer = function() {
			this._removeGrayLayer(), this._removeLineLayers(), this._removeMultiLineLayers(), this._removeConnectionLayers(),
				this._routesArray.length = 0, this._floorOrder.length = 0, delete this._activeRouteType, delete this._activeRoute
		}, fr.prototype.destroy = function() {
			this._mapView.off("changeFloor", this._onChangeFloor), this._mapView.off("changeViewType", this._onChangeViewType)
		}, fr.processFeatures = function(t, e) {
			for (var i = [], o = !0, r = 0; r < t.length; r += 1)
				if (t[r].properties.floor === e) {
					var n = t[r].geometry.coordinates,
						s = n[0],
						a = n[1];
					o && (o = !1, i.push({
						type: "Feature",
						properties: t[r].properties,
						geometry: {
							type: "LineString",
							coordinates: []
						}
					}));
					var h = i[i.length - 1].geometry.coordinates;
					if (h.push(s), t[r + 1]) {
						var l = t[r + 1].properties.floor,
							u = t[r + 1].geometry.coordinates[0];
						fr.isCoordinateEqual(a, u) && l === e || h.push(a)
					} else h.push(a)
				} else o = !0;
			return i
		}, fr.isCoordinateEqual = function(t, e) {
			return t[0] === e[0] && t[1] === e[1]
		}, fr);

	function fr(t, e) {
		this._routesArray = [], this._isShowMultiline = !0, this._floorOrder = [], this._mapView = t, this._options = m(m({},
				pr), e), u(["_onChangeFloor", "_onChangeViewType"], this), this._mapView.on("changeFloor", this._onChangeFloor),
			this._mapView.on("changeViewType", this._onChangeViewType), this._options.offline && (this._roadCalc = new ur(this._mapView, {
				bdId: this._mapView.getBdId()
			})), this._options.grayImage && (this._grayLayer = new xo({
				lineImage: this._options.grayImage,
				lineWidth: this._options.lineWidth,
				base: this._options.lineHeight
			}), this._grayLayer.setSync(!0))
	}

	function gr(t) {
		this._languageType = "cn", this._sourceData = t
	}
	var dr = new(gr.prototype.getType = function() {
			return this._languageType
		}, gr.prototype.changeLanguage = function(t) {
			this._languageType = t
		}, gr.prototype.get = function(t) {
			var e = this._sourceData[this._languageType];
			return e ? e[t] : t
		}, gr)({
			en: {
				elevatorTip: "elevator",
				escalatorTip: "escalator",
				stairsTip: "stairs",
				rampTip: "ramp",
				straightTip: "straight",
				leftRearTip: "Left rear",
				leftTip: "Turn left",
				leftFrontTip: "Ahead left",
				rightFrontTip: "Right forward",
				rightTip: "Turn right",
				rightRearTip: "Right back",
				endTip: "Reach the finish line",
				beforeArriveTip: "You are near your destination",
				simStart: "Simulate navigate start",
				deviateTip: "You have deviated from the route",
				reInitTip: "You are off course and are replanning your route",
				startNaviTip: "Navigate start",
				initNaviError: "Init navigate route failed",
				arriveTip: "You have reached your destination and the navigation is over"
			},
			cn: {
				elevatorTip: "电梯",
				escalatorTip: "扶梯",
				stairsTip: "楼梯",
				rampTip: "坡道",
				straightTip: "直行",
				leftRearTip: "左后方前行",
				leftTip: "左转",
				leftFrontTip: "左前方前行",
				rightFrontTip: "右前方前行",
				rightTip: "右转",
				rightRearTip: "右后方前行",
				endTip: "到达终点",
				beforeArriveTip: "您已接近目的地,请留意",
				simStart: "模拟导航开始",
				deviateTip: "您已偏离路线,请留意",
				reInitTip: "正在为您重新规划路线",
				startNaviTip: "导航开始",
				initNaviError: "渲染导航线失败",
				arriveTip: "您已到达目的地，导航结束"
			}
		}),
		yr = [25136, 25011],
		mr = [25135, 25012],
		vr = [21004, 25134, 25014],
		xr = [25137, 25138];
	var wr = (Mr.prototype.isFacility = function() {
		return Boolean(this._facility)
	}, Mr.prototype.getNextSegment = function() {
		return this._nextSegment
	}, Mr.prototype.getStart = function() {
		return this._line.getStart()
	}, Mr.prototype.getEnd = function() {
		return this._line.getEnd()
	}, Mr.prototype.getClosest = function(t) {
		return this._line.getClosest(t)
	}, Mr.prototype.setNextSegment = function(t) {
		if (this._nextSegment = t, this.floor === this._nextSegment.floor) this._direction = function(t) {
			var e = "straight",
				i = t;
			return 180 <= t ? i -= 360 : i <= -180 && (i += 360), -180 <= i && i <= -120 ? e = "leftRear" : -120 < i && i <=
				-60 ? e = "left" : -60 < i && i <= -5 ? e = "leftFront" : -5 < i && i <= 5 ? e = "straight" : 5 < i && i <= 60 ?
				e = "rightFront" : 60 < i && i <= 120 ? e = "right" : 120 < i && i <= 180 && (e = "rightRear"), e
		}(t._rotate - this._rotate);
		else {
			var e = t._properties.altitude,
				i = this._properties.altitude;
			this._direction = i < e ? "top" : "bottom";
			var o = this._properties.category,
				r = function(t) {
					var e = "",
						i = "";
					return -1 !== yr.indexOf(t) ? (e = dr.get("elevatorTip"), i = "elevator") : -1 !== mr.indexOf(t) ? (e = dr.get(
							"escalatorTip"), i = "escalator") : -1 !== vr.indexOf(t) ? (e = dr.get("stairsTip"), i = "stairs") : -1 !==
						xr.indexOf(t) && (e = dr.get("rampTip"), i = "ramp"), {
							text: e,
							facility: i
						}
				}(Number(o)),
				n = r.text,
				s = r.facility;
			this._facility = s, this._facilityTipText = n
		}
	}, Mr.prototype.getRestDistance = function(t) {
		return t ? t.distanceTo(this._line.getEnd()) : this._distance
	}, Mr.prototype._getNaviDirectionText = function() {
		if (!this._nextSegment) return dr.get("endTip");
		switch (this._direction) {
			case "leftRear":
				return dr.get("leftRearTip");
			case "left":
				return dr.get("leftTip");
			case "leftFront":
				return dr.get("leftFrontTip");
			case "rightFront":
				return dr.get("rightFrontTip");
			case "right":
				return dr.get("rightTip");
			case "rightRear":
				return dr.get("rightRearTip");
			case "straight":
				return dr.get("straightTip");
			case "top":
				var t = this._nextSegment._properties.floorAddress;
				return "cn" === dr.getType() ? "乘" + this._facilityTipText + "上行至" + t + "层" : "Use " + this._facilityTipText +
					" to " + t;
			case "bottom":
				return t = this._nextSegment._properties.floorAddress, "cn" === dr.getType() ? "乘" + this._facilityTipText +
					"下行至" + t + "层" : "Use " + this._facilityTipText + " to " + t;
			default:
				return ""
		}
	}, Mr.prototype.getMessageInNavi = function(t, e) {
		var i, o;
		i = e ? new S(e.x, e.y).distanceTo(this._line.getEnd()) : this._distance, i = Math.round(i);
		var r = "";
		return "outdoor" === this._properties.pathType && (r = "cn" === dr.getType() ? "请先" : "Please "), o = "straight" ===
			this._direction ? "cn" === dr.getType() ? "前方, " + this._getNaviDirectionText() : "In front, " + this._getNaviDirectionText() :
			i < 2 ? this._getNaviDirectionText() : i < 5 ? "cn" === dr.getType() ? "前方, " + this._getNaviDirectionText() :
			"In front, " + this._getNaviDirectionText() : "cn" === dr.getType() ? "直行" + i + "米后, " + this._getNaviDirectionText() :
			"After " + i + " meters, " + this._getNaviDirectionText(), this._nextSegment && this._nextSegment._facility &&
			this._nextSegment._distance + i < t ? {
				isWillChange: i < 5,
				message: r + (o = "cn" === dr.getType() ? "前方" + this._getNaviDirectionText() + ", 然后" + this._nextSegment._getNaviDirectionText() :
					"In front " + this._getNaviDirectionText() + ", then " + this._nextSegment._getNaviDirectionText()),
				direction: this._nextSegment._direction,
				facilityTipText: this._nextSegment._facilityTipText,
				facility: this._nextSegment._facility
			} : {
				isWillChange: i < 5,
				message: "" + r + o,
				direction: this._direction,
				facilityTipText: this._facilityTipText,
				facility: this._facility
			}
	}, Mr.prototype.getLine = function() {
		return this._line
	}, Mr.prototype.getDistance = function() {
		return this._distance
	}, Mr.prototype.getRotate = function() {
		return this._rotate
	}, Object.defineProperty(Mr.prototype, "floor", {
		get: function() {
			return this._properties.floor
		},
		enumerable: !0,
		configurable: !0
	}), Mr.prototype.getProperties = function() {
		return this._properties
	}, Mr);

	function Mr(t, e) {
		this._line = new Le(t[0], t[1]), this._properties = e, this._distance = this._line.getLength();
		var i = new Nt([0, 1]),
			o = new Nt(t[0], t[1]);
		this._rotate = i.angleTo(o)
	}
	var Tr = (br.prototype.init = function(t) {
		this.reset();
		for (var e = 0; e < t.length; e += 1) {
			var i = t[e],
				o = i.geometry.coordinates,
				r = i.properties,
				n = new wr(o, r);
			this._segments.push(n)
		}
		for (e = 0; e < this._segments.length; e += 1) e + 1 < this._segments.length && this._segments[e].setNextSegment(
			this._segments[e + 1])
	}, br.prototype.getClosestCoord = function(t, e) {
		for (var i, o = -1, r = 0; r < this._segments.length; r += 1)
			if (this._segments[r].floor === t) {
				var n = this._segments[r].getClosest(e);
				(!i || n.distance < i.distance) && (i = n, o = r)
			} var s = i.coordinate,
			a = new S(e.x, e.y),
			h = new S(s.x, s.y),
			l = this._segments[o],
			u = l.getNextSegment(),
			_ = l.getRestDistance(h),
			p = {
				index: o,
				coordinate: h,
				isClosestFacility: !1,
				distance: a.distanceTo(h)
			};
		return l.isFacility() && _ < this._options.adsorbFacilityDis ? (p.coordinate = l.getEnd(), p.isClosestFacility = !
			0) : u && u.isFacility() && (_ += u.getDistance()) < this._options.adsorbFacilityDis && (p.index = o + 1, p.coordinate =
			u.getEnd(), p.isClosestFacility = !0), p
	}, br.prototype.distanceToEnd = function(t, e) {
		for (var i = 0, o = t + 1; o < this._segments.length; o += 1) i += this._segments[o].getDistance();
		var r = this._segments[t].getEnd();
		return i += new S(e.x, e.y).distanceTo(r)
	}, br.prototype.findNearSegment = function(t, e, i) {
		void 0 === i && (i = !0), this._crtIndex = t, this._ctrCoordinate = e;
		var o = t;
		this.crtSegment.getRestDistance(this._ctrCoordinate) < this._options.restRotateDistance && t < this._segments.length -
			1 && this._segments[t].floor === this._segments[t + 1].floor && (o += 1), this._crtRotate = this._segments[o].getRotate(),
			i && this._moveToSegment(this._crtRotate)
	}, br.prototype._moveToSegment = function(t) {
		if (t !== this._mapView.getRotate()) {
			var e = this._mapView.getRotate() || 0,
				i = F.normalizeRotate(t, e),
				o = Math.abs(i - e) / this._options.rotateSpeed * 1e3;
			this._mapView.easeTo({
				rotate: t,
				duration: o,
				easing: "linear",
				offset: this._options.offset
			})
		}
	}, br.prototype.getMessageInNavi = function() {
		return this._segments[this._crtIndex].getMessageInNavi(this._options.maxFacilityDis, this._ctrCoordinate)
	}, br.prototype.getMessageInList = function() {
		for (var t = [], e = 0; e < this._segments.length; e += 1) t.push(this._segments[e].getMessageInNavi(this._options
			.maxFacilityDis));
		return t
	}, Object.defineProperty(br.prototype, "crtRotate", {
		get: function() {
			return this._crtRotate
		},
		enumerable: !0,
		configurable: !0
	}), Object.defineProperty(br.prototype, "crtSegment", {
		get: function() {
			return this._segments[this._crtIndex]
		},
		enumerable: !0,
		configurable: !0
	}), Object.defineProperty(br.prototype, "crtIndex", {
		get: function() {
			return this._crtIndex
		},
		enumerable: !0,
		configurable: !0
	}), br.prototype.getStartFloor = function() {
		return this._segments[0].floor
	}, br.prototype.getWholeDistance = function() {
		for (var t = 0, e = 0; e < this._segments.length; e += 1) t += this._segments[e].getDistance();
		return t
	}, br.prototype.getEndFloor = function() {
		return this._segments[this._segments.length - 1].floor
	}, br.prototype.getSegments = function() {
		return this._segments
	}, br.prototype.reset = function() {
		this._segments.length = 0, delete this._ctrCoordinate, this._crtIndex = -1
	}, br);

	function br(t, e) {
		this._segments = [], this._crtIndex = -1, this._mapView = t, this._options = e
	}
	var Cr = (Er.prototype.addTo = function(t) {
		this._mapView = t
	}, Er.prototype.setMarker = function(t, e, i) {
		if (this._mapView) {
			var o = this._markers.get(t);
			if (o) o.setPosition(e, i);
			else {
				var r = this._markerConfig[t],
					n = r.type,
					s = r.url,
					a = r.size,
					h = r.anchor,
					l = r.plane;
				if ("layer" === n) {
					if ("number" != typeof a) throw new Error("MarkerConfig: type 是 layer 时, size 应为 number");
					(o = new co({
						iconImage: s,
						iconAnchor: h,
						iconSize: a
					})).setIgnoreMultiFade(!0)
				} else {
					if (!Array.isArray(a) || 2 !== a.length) throw new Error(
						"MarkerConfig: type 是 overlay 是, size 应为[width, height]");
					var u = new Image;
					u.src = s, u.style.width = a[0] + "px", u.style.height = a[1] + "px", o = new _o(u, {
						plane: l,
						anchor: h
					})
				}
				o.addTo(this._mapView), o.setPosition(e, i), this._markers.set(t, o)
			}
		} else console.error("setMarker: please use it after addTo")
	}, Er.prototype.updateMarker = function(t, e) {
		var i = this.getMarker(t);
		if (i) {
			var o = i.getPosition();
			if (o) {
				var r = o.floorId,
					n = o.coordinate;
				this.setMarker(e, r, n);
				var s = this._markers.get(e);
				s && s.setAlwaysShow(i.getAlwaysShow()), this.removeMarker(t)
			}
		} else console.warn("updateMarker: oldMarker is not exit")
	}, Er.prototype.removeMarker = function(t) {
		var e = this.getMarker(t);
		e && (e.remove(), this._markers.delete(t))
	}, Er.prototype.getMarker = function(t) {
		return this._markers.get(t)
	}, Er.prototype.clear = function() {
		this._markers.forEach(function(t) {
			t.remove()
		}), this._markers.clear()
	}, Er.prototype.destroy = function() {
		this.clear(), delete this._mapView
	}, Er);

	function Er(t) {
		this._markers = new Map, this._markerConfig = t
	}
	var Lr = {
			lines: 12,
			length: 7,
			width: 5,
			radius: 10,
			scale: 1,
			corners: 1,
			color: "#000",
			fadeColor: "transparent",
			animation: "spinner-line-fade-default",
			rotate: 0,
			direction: 1,
			speed: 1,
			zIndex: 2e9,
			className: "spinner",
			top: "50%",
			left: "50%",
			shadow: "0 0 1px transparent",
			position: "absolute"
		},
		Ir = (Rr.prototype.spin = function(t) {
			return this.stop(), this.el = document.createElement("div"), this.opts.className && (this.el.className = this.opts
					.className), this.el.setAttribute("role", "progressbar"), Sr(this.el, {
					position: this.opts.position,
					width: 0,
					zIndex: this.opts.zIndex,
					left: this.opts.left,
					top: this.opts.top,
					transform: "scale(" + this.opts.scale + ")"
				}), t && t.insertBefore(this.el, t.firstChild || null),
				function(t, e) {
					var i = Math.round(e.corners * e.width * 500) / 1e3 + "px",
						o = "none";
					!0 === e.shadow ? o = "0 2px 4px #000" : "string" == typeof e.shadow && (o = e.shadow);
					for (var r = function(t) {
							for (var e = /^\s*([a-zA-Z]+\s+)?(-?\d+(\.\d+)?)([a-zA-Z]*)\s+(-?\d+(\.\d+)?)([a-zA-Z]*)(.*)$/, i = [], o = 0,
									r = t.split(","); o < r.length; o++) {
								var n = r[o].match(e);
								if (null !== n) {
									var s = +n[2],
										a = +n[5],
										h = n[4],
										l = n[7];
									0 != s || h || (h = l), 0 != a || l || (l = h), h === l && i.push({
										prefix: n[1] || "",
										x: s,
										y: a,
										xUnits: h,
										yUnits: l,
										end: n[8]
									})
								}
							}
							return i
						}(o), n = 0; n < e.lines; n++) {
						var s = ~~(360 / e.lines * n + e.rotate),
							a = Sr(document.createElement("div"), {
								position: "absolute",
								top: -e.width / 2 + "px",
								width: e.length + e.width + "px",
								height: e.width + "px",
								background: Pr(e.fadeColor, n),
								borderRadius: i,
								transformOrigin: "left",
								transform: "rotate(" + s + "deg) translateX(" + e.radius + "px)"
							}),
							h = n * e.direction / e.lines / e.speed;
						h -= 1 / e.speed;
						var l = Sr(document.createElement("div"), {
							width: "100%",
							height: "100%",
							background: Pr(e.color, n),
							borderRadius: i,
							boxShadow: Fr(r, s),
							animation: 1 / e.speed + "s linear " + h + "s infinite " + e.animation
						});
						a.appendChild(l), t.appendChild(a)
					}
				}(this.el, this.opts), this
		}, Rr.prototype.stop = function() {
			return this.el && ("undefined" != typeof requestAnimationFrame ? cancelAnimationFrame(this.animateId) :
					clearTimeout(this.animateId), this.el.parentNode && this.el.parentNode.removeChild(this.el), this.el = void 0),
				this
		}, Rr);

	function Rr(t) {
		void 0 === t && (t = {}), this.opts = m(m({}, Lr), t)
	}

	function Sr(t, e) {
		for (var i in e) t.style[i] = e[i];
		return t
	}

	function Pr(t, e) {
		return "string" == typeof t ? t : t[e % t.length]
	}

	function Fr(t, e) {
		for (var i, o, r, n, s, a = [], h = 0, l = t; h < l.length; h++) {
			var u = l[h],
				_ = (i = u.x, o = u.y, void 0, r = e * Math.PI / 180, n = Math.sin(r), s = Math.cos(r), [Math.round(1e3 * (i * s +
					o * n)) / 1e3, Math.round(1e3 * (-i * n + o * s)) / 1e3]);
			a.push(u.prefix + _[0] + u.xUnits + " " + _[1] + u.yUnits + u.end)
		}
		return a.join(", ")
	}

	function Ar() {
		this._spinner = new Ir, this._loadingDom = document.createElement("div"), this._loadingDom.className = "ngr-loading",
			this._tipDom = document.createElement("div"), this._tipDom.className = "ngr-tip"
	}
	var Vr = new(Ar.prototype.setLoadingStyle = function(t) {
		for (var e in t) this._loadingDom.style[e] = t[e]
	}, Ar.prototype.setTipStyle = function(t) {
		for (var e in t) this._tipDom.style[e] = t[e]
	}, Ar.prototype.loading = function() {
		this._loadingDom.parentElement || (this._spinner.spin(this._loadingDom), document.body.appendChild(this._loadingDom))
	}, Ar.prototype.hideLoading = function() {
		this._spinner.stop(), this._loadingDom.remove()
	}, Ar.prototype.tip = function(t, e) {
		var i = this;
		void 0 === e && (e = 2e3), this._tipTimer && (this._tipDom.innerHTML = "", clearTimeout(this._tipTimer), delete this
			._tipTimer);
		var o = [];
		"string" == typeof t ? (this._tipDom.style.textAlign = "center", o.push(t)) : Array.isArray(t) && (o = t);
		for (var r = 0; r < o.length; r += 1) {
			var n = document.createElement("span");
			n.className = "ngr-text-span", n.textContent = o[r];
			var s = document.createElement("br");
			this._tipDom.appendChild(n), this._tipDom.appendChild(s)
		}
		this._tipDom.parentElement || document.body.appendChild(this._tipDom), 0 !== e && (this._tipTimer = window.setTimeout(
			function() {
				return i._tipDom.remove()
			}, e))
	}, Ar.prototype.hideTip = function() {
		this._tipDom.remove()
	}, Ar);

	function Nr() {
		Vr.loading()
	}

	function Br() {
		Vr.hideLoading()
	}

	function kr(t, e) {
		void 0 === e && (e = 2e3), Vr.tip(t, e)
	}
	var Or = Object.freeze({
			__proto__: null,
			setLoadingStyle: function(t) {
				Vr.setLoadingStyle(t)
			},
			loading: Nr,
			hideLoading: Br,
			setTipStyle: function(t) {
				Vr.setTipStyle(t)
			},
			tip: kr,
			hideTip: function() {
				Vr.hideTip()
			}
		}),
		zr = (Dr.prototype._onPlaying = function() {
			this._isPlaying = !0
		}, Dr.prototype._onPlayEnd = function() {
			this._isPlaying = !1, this.playMessage(this._audioStack.shift())
		}, Dr.prototype.playMessage = function(t, e) {
			void 0 === e && (e = !1), t && "close" !== this._status && (this._isPlaying ? e && this._audioStack.push(t) : (
				this._dom.src = Dr.AUDIO_SERVER + "?tex=" + t, this._dom.play(), this._isPlaying = !0))
		}, Dr.prototype.open = function() {
			this._status = "open", this._dom.muted = !1
		}, Dr.prototype.close = function() {
			this._status = "close", this._dom.muted = !0
		}, Dr.prototype.destroy = function() {
			this._status = "open", this._isPlaying = !1, this._dom.removeEventListener("playing", this._onPlaying), this._dom.removeEventListener(
				"ended", this._onPlayEnd), this._dom.remove()
		}, Dr.prototype._initDom = function() {
			this._dom.addEventListener("playing", this._onPlaying), this._dom.addEventListener("ended", this._onPlayEnd), this
				._dom.style.display = "none", document.body.appendChild(this._dom)
		}, Dr.prototype.refresh = function() {
			this.destroy(), this._dom = document.createElement("audio"), this._initDom()
		}, Dr.AUDIO_SERVER = "https://apiexternal.ipalmap.com:10010/speech", Dr);

	function Dr() {
		this._audioStack = [], this._status = "open", this._isPlaying = !1, u(["_onPlaying", "_onPlayEnd"], this), this._dom =
			document.createElement("audio"), this._initDom()
	}
	var Ur, Gr = {
			lineWidth: 15,
			lineHeight: 0,
			changeFloorTime: 600,
			maxDistanceArriving: 3,
			maxRoadAttachDistance: 6,
			maxDistanceReInitNavi: 8,
			outdoorMaxRoadAttachDistance: 10,
			outdoorMaxDistanceReInitNavi: 15,
			maxShakeDistance: 1,
			navigatingZoom: 21,
			navigatingPitch: 60,
			navigatingOffset: [0, 150],
			rotateSpeed: 220,
			autoTip: !0,
			restRotateDistance: .3,
			hideControlByNavigating: ["view", "floor", "locate"],
			strategies: ["shortest", "elevator", "escalator", "stair", "ramp"],
			maxDistanceArriveTip: 15,
			fitPadding: 120,
			simSpeed: 3,
			simNaviInfoInterval: 1e3,
			maxFacilityDis: 10,
			recoveryTime: 5e3,
			adsorbFacilityDis: 6,
			simulateEasing: "easeInOutSine",
			naviServer: "https://path.ipalmap.com/navi",
			offline: !1,
			deviateReInitNum: 3
		},
		Wr = (e(Zr, Ur = i), Zr.prototype.addTo = function(t) {
			this._mapView = t, this._mapView.on("gestureStart", this._onMapGestureStart), this._mapView.on("gestureEnd", this._onMapGestureEnd),
				this._markerMng.addTo(t), this._naviMng = new cr(t, {
					lineImage: this._options.lineImage,
					lineWidth: this._options.lineWidth,
					strategies: this._options.strategies,
					server: this._options.naviServer,
					lineHeight: this._options.lineHeight,
					offline: this._options.offline,
					grayImage: this._options.grayImage
				}), this._dynamicMng = new Tr(t, {
					rotateSpeed: this._options.rotateSpeed,
					offset: this._options.navigatingOffset,
					restRotateDistance: this._options.restRotateDistance,
					maxFacilityDis: this._options.maxFacilityDis,
					adsorbFacilityDis: this._options.adsorbFacilityDis
				})
		}, Zr.prototype.setNavigateViewType = function(t) {
			this._navigateViewType = t
		}, Zr.prototype._onMapGestureStart = function() {
			"init" !== this._status && (this.fire("navigatingInterrupt"), this._mapView && this._mapView.stop(), this._simAnimator &&
				(this._simAnimator.stop(), delete this._simAnimator), this._isInTouchDuration = !0, this._touchTimer && (
					clearTimeout(this._touchTimer), delete this._touchTimer))
		}, Zr.prototype._onMapGestureEnd = function() {
			var t = this;
			"init" !== this._status && (this.fire("recoveryNavigatingReady"), this._touchTimer = window.setTimeout(function() {
				t.recoveryNavigating()
			}, this._options.recoveryTime))
		}, Zr.prototype.recoveryNavigating = function() {
			var t = this;
			if (this._mapView && this._dynamicMng && this._touchTimer)
				if (clearTimeout(this._touchTimer), delete this._touchTimer, this._isInTouchDuration = !1, this.fire(
						"recoveryNavigating"), "navigating" === this._status) {
					if (!this._locationMng) return;
					if (!(e = this._locationMng.getPosition())) return;
					"first" === this._navigateViewType && this._mapView.easeTo({
						center: e.coordinate,
						offset: this._options.navigatingOffset,
						rotate: this._dynamicMng.crtRotate,
						duration: 300,
						easing: "linear"
					})
				} else if ("simulateNavigate" === this._status) {
				var e, i = this._markerMng.getMarker("sim");
				if (!i) return;
				if (!(e = i.getPosition())) return;
				"first" === this._navigateViewType && this._mapView.easeTo({
					center: e.coordinate,
					offset: this._options.navigatingOffset,
					rotate: this._dynamicMng.crtRotate,
					duration: 300,
					easing: "linear"
				}), w(316).then(function() {
					return t._simulate()
				})
			}
		}, Zr.prototype.getActiveRouteType = function() {
			return this._naviMng && this._naviMng.getActiveRouteType()
		}, Zr.prototype.initNavi = function() {
			return v(this, void 0, void 0, function() {
				var e, i, o, r;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return e = this.getMarker("start"), i = this.getMarker("end"), e && i ? (o = e.getPosition(), r = i.getPosition(),
								o && r ? [4, this._renderNavi(o, r)] : (console.error(
									"initNavi: startPosition and endPosition is all required"), [2])) : (console.error(
								"initNavi: startMarker and endMarker is all required"), [2]);
						case 1:
							return t.sent(), this.fire("initNavi"), [2]
					}
				})
			})
		}, Zr.prototype.getWholeDistance = function() {
			return this._dynamicMng ? this._dynamicMng.getWholeDistance() : -1
		}, Zr.prototype.getAllRouteType = function() {
			return this._naviMng ? this._naviMng.getAllRouteType() : []
		}, Zr.prototype.setActiveRoute = function(t) {
			if (this._naviMng && this._naviMng.getActiveRouteType() !== t) {
				this._naviMng.setActiveRoute(t);
				var e = this._naviMng.getActiveRoute();
				e && this._dynamicMng && this._dynamicMng.init(e)
			}
		}, Zr.prototype._beforeReInit = function(s, a) {
			return v(this, void 0, void 0, function() {
				var e, i, o, r, n;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return this._dynamicMng ? (e = this._options.maxRoadAttachDistance, "outdoor" === this._lastFloor && (e =
									this._options.outdoorMaxRoadAttachDistance), i = s.floorId, o = s.coordinate, r = dr.get("reInitTip"),
								this._audioProvider.playMessage(r), this._tip(r), [4, this._renderNavi(s, a)]) : [2];
						case 1:
							return t.sent(), (n = this._dynamicMng.getClosestCoord(i, o)).distance < e && this._setupNavigating(i, n.coordinate,
								n.index), [2]
					}
				})
			})
		}, Zr.prototype.startNavigate = function() {
			return v(this, void 0, void 0, function() {
				var e, i, o, r, n, s, a;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return this._mapView && this._dynamicMng && this._naviMng ? this._locationMng ? (e = this._markerMng.getMarker(
								"end"), this._isCanNavi() && e ? (i = e.getPosition(), (o = this._locationMng.getPosition()) && i ? (
								this._preNavigating(), this._locationMng.startNavigate(), r = o.floorId, n = o.coordinate, r === this._mapView
								.currentFloor ? [3, 3] : [4, this._mapView.setCurrentFloor(r)]) : (console.error(
								"startNavigate: 无定位点无法开始导航"), [2])) : (console.error("startNavigate: 请先规划路线"), [2])) : (console.error(
								"startNavigate: 需要设置 setLocationManager"), [2]) : [2];
						case 1:
							return t.sent(), [4, w(this._options.changeFloorTime)];
						case 2:
							t.sent(), t.label = 3;
						case 3:
							return s = this._options.maxRoadAttachDistance, "outdoor" === this._lastFloor && (s = this._options.outdoorMaxRoadAttachDistance),
								new Set(this._naviMng.getFloorOrder()).has(r) && (a = this._dynamicMng.getClosestCoord(r, n)).distance <
								s ? this._setupNavigating(r, a.coordinate, a.index) : this._beforeReInit(o, i), [4, w(1e3)];
						case 4:
							return t.sent(), this._status = "navigating", [2]
					}
				})
			})
		}, Zr.prototype._setupNavigating = function(t, e, i) {
			if (this._locationMng && this._dynamicMng && this._mapView && this._naviMng) {
				this._locationMng.setPosition(t, e), this._dynamicMng.findNearSegment(i, e, !1);
				var o = this._dynamicMng.getMessageInNavi(),
					r = this._dynamicMng.distanceToEnd(i, e);
				this._fireNavigatingInfo(m(m({}, o), {
						distanceToEnd: r
					})), this._audioProvider.playMessage("" + dr.get("startNaviTip") + o.message), this._naviMng.setWalked(t, e, i),
					this._fireARChange(t, e), "first" === this._navigateViewType && this._mapView.easeTo({
						center: e,
						zoom: this._options.navigatingZoom,
						pitch: this._options.navigatingPitch,
						rotate: this._dynamicMng.crtSegment.getRotate(),
						duration: 1e3,
						offset: this._options.navigatingOffset
					})
			}
		}, Zr.prototype._preNavigating = function() {
			this._audioProvider.refresh(), this._naviMng && this._naviMng.setIsShowMultiline(!1), this._toggleControl(!1),
				this._mapView && this._mapView.setViewType("single")
		}, Zr.prototype.removeLayers = function() {
			this._markerMng.clear(), this._naviMng && this._naviMng.removeLayer(), this._dynamicMng && this._dynamicMng.reset()
		}, Zr.prototype._isCanNavi = function() {
			return this._naviMng && this._naviMng.hasNavi() && this._dynamicMng && 0 < this._dynamicMng.getSegments().length
		}, Zr.prototype.locationChange = function(t, e, i) {
			if (this._mapView && "0" !== t && 0 !== e.x && 0 !== e.y) {
				var o = "outdoor" === t ? this._mapView.getDefaultFloor() : t;
				if (o) {
					if ("navigating" === this._status) {
						var r = new S(e.x, e.y);
						this._dynamicNavigate(o, r, i, "outdoor" === t)
					} else this._locationMng && this._locationMng.setPosition(o, e, i);
					this._lastFloor = t
				}
			}
		}, Zr.prototype.getNavigatingRotate = function() {
			return this._dynamicMng ? this._dynamicMng.crtRotate : 0
		}, Zr.prototype._fireARChange = function(t, e) {
			if (this._naviMng && this._mapView) {
				var i = this._mapView.getEngine();
				i && this.fire("arChange", {
					coordinate: e,
					line: this._naviMng.getRestLines(t),
					offset: i.getOffset()
				})
			}
		}, Zr.prototype.getFloorOrder = function() {
			return this._naviMng ? this._naviMng.getFloorOrder() : []
		}, Zr.prototype._dynamicNavigate = function(f, g, d, y) {
			return v(this, void 0, void 0, function() {
				var e, i, o, r, n, s, a, h, l, u, _, p, c;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return this._mapView && this._dynamicMng && this._naviMng && this._locationMng ? this._isInitNavi ? (this._locationMng
								.setPosition(f, g, d), this._fireARChange(f, g), [2]) : (e = this._options, i = e.maxDistanceReInitNavi,
								o = e.maxRoadAttachDistance, y && (i = this._options.outdoorMaxDistanceReInitNavi, o = this._options.outdoorMaxRoadAttachDistance),
								new Set(this._naviMng.getFloorOrder()).has(f) ? f === this._mapView.currentFloor ? [3, 3] : [4, this._mapView
									.setCurrentFloor(f)
								] : ((_ = this._dynamicMng.crtSegment) && (_.getEnd().distanceTo(g) < o ? (this._locationMng.setPosition(
										f, _.getEnd(), d), this._mapMoveToCenter(_.getEnd(), d), this._fireARChange(f, _.getEnd()), this._deviateNum =
									0) : this._deviateNum += 1, this._deviateNum >= this._options.deviateReInitNum && (this._reInitNavi(f,
									g, y), this._mapMoveToCenter(g, d), this._fireARChange(f, g), this._deviateNum = 0)), [2])) : [2];
						case 1:
							return t.sent(), [4, w(this._options.changeFloorTime)];
						case 2:
							t.sent(), t.label = 3;
						case 3:
							if (r = this._dynamicMng.getClosestCoord(f, g), n = r.index, s = r.coordinate, a = r.distance, h = this._dynamicMng
								.crtIndex, l = this._dynamicMng.crtSegment, u = this._dynamicMng.distanceToEnd(n, s), f !== this._lastFloor &&
								l && l.isFacility()) {
								if (!(_ = this._dynamicMng.getSegments()[h + 1])) return [2];
								n = h + 1, a = 0, s = _.getStart()
							}
							return a <= o ? this._isSameFloor(f) && u <= this._options.maxDistanceArriving ? (this._locationMng.setPosition(
										f, g, d, this._isInTouchDuration), this._mapMoveToCenter(g, d), this._fireNavigateEnd(), this._naviMng.setAllWalked(),
									this._fireARChange(f, g), [2]) : this._lastDisToEnd && u > this._lastDisToEnd && u - this._lastDisToEnd <
								this._options.maxShakeDistance ? [2] : (this._lastDisToEnd = u, this._isSameFloor(f) && u < this._options
									.maxDistanceArriveTip && !this._isTipEnd && f === this._dynamicMng.getEndFloor() && (c = dr.get(
										"beforeArriveTip"), this._tip(c), this._audioProvider.playMessage(c), this._isTipEnd = !0), this._locationMng
									.setPosition(f, s, d, this._isInTouchDuration), this._naviMng.setWalked(f, s, n), this._fireARChange(f,
										s), this._dynamicMng.findNearSegment(n, s, !this._isInTouchDuration && "first" === this._navigateViewType),
									p = this._dynamicMng.getMessageInNavi(), this._fireNavigatingInfo(m(m({}, p), {
										distanceToEnd: u
									})), h !== this._dynamicMng.crtIndex ? (this._audioProvider.playMessage(p.message), this._isPlayWill = !
										1) : p.isWillChange && !this._isPlayWill && (this._audioProvider.playMessage(p.message), this._isPlayWill = !
										0), this._dynamicMng.crtRotate === this._mapView.getRotate() ? [3, 5] : (this._isMapRotate = !0, [4, w(
										this._getRotateDuration(this._dynamicMng.crtRotate) + 16)])) : [3, 6];
						case 4:
							t.sent(), this._isMapRotate = !1, t.label = 5;
						case 5:
							return this._isMapRotate || this._mapMoveToCenter(s, d), [3, 7];
						case 6:
							a < i ? (c = dr.get("deviateTip"), this._tip(c), this._audioProvider.playMessage(c), this._fireNavigatingInfo({
								message: c,
								distanceToEnd: u,
								isWillChange: !1
							}), this._locationMng.setPosition(f, g, d, this._isInTouchDuration), this._fireARChange(f, g), this._mapMoveToCenter(
								g, d)) : (this._locationMng.setPosition(f, g, d, this._isInTouchDuration), this._fireARChange(f, g),
								this._mapMoveToCenter(g, d), this._reInitNavi(f, g, y)), t.label = 7;
						case 7:
							return [2]
					}
				})
			})
		}, Zr.prototype._isSameFloor = function(t) {
			if (!this._naviMng) return !1;
			var e = this._naviMng.getFloorOrder();
			return e[e.length - 1] === t
		}, Zr.prototype._getRotateDuration = function(t) {
			if (!this._mapView || "number" != typeof t) return 0;
			var e = this._mapView.getRotate() || 0,
				i = F.normalizeRotate(t, e);
			return Math.abs(i - e) / this._options.rotateSpeed * 1e3 + 16
		}, Zr.prototype._mapMoveToCenter = function(t, e) {
			this._mapView && (this._isInTouchDuration || "first" !== this._navigateViewType || this._mapView.easeTo({
				center: t,
				duration: e,
				easing: "linear",
				offset: this._options.navigatingOffset
			}))
		}, Zr.prototype._reInitNavi = function(r, n, s) {
			return v(this, void 0, void 0, function() {
				var e, i, o;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return this._dynamicMng && this._naviMng ? this._lastReInitNaviPoint && this._lastReInitNaviPoint.equal(n) ?
								[2] : (this._lastReInitNaviPoint = n.clone(), (e = this._markerMng.getMarker("end")) && (i = e.getPosition()) ?
									(o = dr.get("reInitTip"), this._audioProvider.playMessage(o), this._tip(o), delete this._lastDisToEnd, [
										4, this._renderNavi({
											floorId: r,
											coordinate: n
										}, i)
									]) : [2]) : [2];
						case 1:
							return t.sent(), this._dynamicNavigate(r, n, 500, s), [2]
					}
				})
			})
		}, Zr.prototype._resetStatus = function() {
			this._status = "init", this._isPlayWill = !1, this._isTipEnd = !1, this._simIndex = 0, delete this._lastDisToEnd,
				this._isInTouchDuration = !1, this._touchTimer && (clearTimeout(this._touchTimer), delete this._touchTimer)
		}, Zr.prototype._toggleControl = function(t) {
			if (this._mapView)
				for (var e = this._options.hideControlByNavigating, i = 0; i < e.length; i += 1) {
					var o = this._mapView.getControl(e[i]);
					o && (t ? o.show() : o.hide())
				}
		}, Zr.prototype._tip = function(t) {
			this._options.autoTip && (this.fire("tip", t), kr(t))
		}, Zr.prototype._fireNavigateEnd = function() {
			this._mapView && (this.fire("navigateEnd"), this._resetStatus(), this._toggleControl(!0), this._locationMng &&
				this._locationMng.endNavigate(), this._audioProvider.playMessage(dr.get("endTip"), !0))
		}, Zr.prototype.navigateComplete = function() {
			this.removeLayers()
		}, Zr.prototype.navigateCancel = function() {
			this._toggleControl(!0), this._resetStatus(), this._simAnimator && this._simAnimator.stop(), this._mapView && this
				._mapView.stop(), this._audioProvider.close(), this._locationMng && (this._locationMng.show(), this._locationMng.endNavigate()),
				this.removeLayers()
		}, Zr.prototype.exitNavigate = function() {
			return v(this, void 0, void 0, function() {
				var e, i;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return this._mapView && this._dynamicMng && this._naviMng ? (this._resetStatus(), this._toggleControl(!0),
								this.removeMarker("sim"), this._simAnimator && this._simAnimator.stop(), this._mapView && this._mapView.stop(),
								this._audioProvider.close(), e = this._dynamicMng.getStartFloor(), this._locationMng && (this._locationMng
									.show(), this._locationMng.endNavigate(), i = this._locationMng.getPosition(), e = i ? i.floorId : e),
								e === this._mapView.currentFloor ? [3, 3] : [4, this._mapView.setCurrentFloor(e)]) : [2];
						case 1:
							return t.sent(), [4, w(this._options.changeFloorTime)];
						case 2:
							t.sent(), t.label = 3;
						case 3:
							return this._naviMng.setIsShowMultiline(!0), [2]
					}
				})
			})
		}, Zr.prototype.fitNaviLine = function() {
			if (this._naviMng && this._mapView && "multiple" !== this._mapView.getViewType()) {
				var t = this._options.fitPadding,
					e = this._naviMng.getNaviBounds();
				e && this._mapView.fitBounds(e, t)
			}
		}, Zr.prototype.setLocationManager = function(t) {
			this._locationMng = t
		}, Zr.prototype.removeLocationManager = function() {
			delete this._locationMng
		}, Zr.prototype.getStatus = function() {
			return this._status
		}, Zr.prototype._renderNavi = function(o, r) {
			return v(this, void 0, void 0, function() {
				var e, i;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							if (!this._naviMng) return [2];
							t.label = 1;
						case 1:
							return t.trys.push([1, 3, 4, 5]), this._options.autoTip && Nr(), this._isInitNavi = !0, [4, this._naviMng.renderNavi(
								o, r)];
						case 2:
							return t.sent(), e = this._naviMng.getActiveRoute(), this._dynamicMng && e && this._dynamicMng.init(e), [3,
								5
							];
						case 3:
							throw i = t.sent(), this._tip("请求导航线失败"), i;
						case 4:
							return this._options.autoTip && Br(), this._isInitNavi = !1, [7];
						case 5:
							return [2]
					}
				})
			})
		}, Zr.prototype.setPickMarker = function(t, e) {
			this.setMarker("pick", t, e), this._mapView && this._mapView.easeTo({
				center: e,
				duration: this._options.pickDuration,
				zoom: this._options.pickZoom
			})
		}, Zr.prototype.setStartMarker = function(t, e) {
			this.setMarker("start", t, e)
		}, Zr.prototype.setEndMarker = function(t, e) {
			this.setMarker("end", t, e)
		}, Zr.prototype.updateMarker = function(t, e) {
			this._markerMng.updateMarker(t, e)
		}, Zr.prototype.removeMarker = function(t) {
			this._markerMng.removeMarker(t)
		}, Zr.prototype.simulateNavigate = function() {
			return v(this, void 0, void 0, function() {
				var e, i, o, r, n = this;
				return x(this, function(t) {
					switch (t.label) {
						case 0:
							return this._mapView && this._naviMng && this._dynamicMng ? this._naviMng.hasNavi() ? (this._status =
								"simulateNavigate", this._preNavigating(), this._locationMng && this._locationMng.hide(), e = this._dynamicMng
								.getStartFloor(), i = this._naviMng.getRoutes(), this.setMarker("sim", e, i[0].line[0]), e === this._mapView
								.currentFloor ? [3, 3] : [4, this._mapView.setCurrentFloor(e)]) : (console.error("请先规划路线"), [2]) : [2];
						case 1:
							return t.sent(), [4, w(this._options.changeFloorTime)];
						case 2:
							t.sent(), t.label = 3;
						case 3:
							return o = this._dynamicMng.getSegments(), this._dynamicMng.findNearSegment(0, i[0].line[0], !1), r = this
								._dynamicMng.getMessageInNavi(), this._fireNavigatingInfo(m(m({}, r), {
									distanceToEnd: this._dynamicMng.getWholeDistance()
								})), this._audioProvider.playMessage(dr.get("simStart") + "," + r.message), "first" === this._navigateViewType ?
								this._mapView.easeTo({
									center: i[0].line[0],
									zoom: this._options.navigatingZoom,
									pitch: this._options.navigatingPitch,
									rotate: o[0].getRotate(),
									duration: 3e3,
									offset: this._options.navigatingOffset,
									complete: function() {
										return n._simulate()
									}
								}) : this._simulate(), [2]
					}
				})
			})
		}, Zr.prototype._simulate = function() {
			var t = this;
			if (this._naviMng && "simulateNavigate" === this._status) {
				var u = this._naviMng.getRoutes(),
					_ = this._options.simSpeed,
					p = function() {
						return v(t, void 0, void 0, function() {
							var s, e, i, o, r, n, a, h, l = this;
							return x(this, function(t) {
								switch (t.label) {
									case 0:
										return "simulateNavigate" === this._status && this._dynamicMng && this._mapView ? (s = u[this._simIndex]
											.line[1], e = this._markerMng.getMarker("sim"), i = e.getPosition().coordinate, o = new S(i.x, i.y),
											r = o.distanceTo(s), n = Math.max(r / _ * 1e3, 16), a = Date.now(), this._dynamicMng.findNearSegment(
												this._simIndex, o, "first" === this._navigateViewType), e.setRotate("first" === this._navigateViewType ?
												0 : this._dynamicMng.crtSegment.getRotate()), this._dynamicMng.crtRotate === this._mapView.getRotate() ||
											"first" !== this._navigateViewType ? [3, 2] : [4, w(this._getRotateDuration(this._dynamicMng.crtRotate) +
												16)]) : [2];
									case 1:
										t.sent(), t.label = 2;
									case 2:
										return h = this._dynamicMng.getMessageInNavi(), this._audioProvider.playMessage(h.message), this._simAnimator &&
											this._simAnimator.stop(), this._simAnimator = (new L).ofObject(o, s, n), this._simAnimator.easing(this
												._options.simulateEasing), "first" === this._navigateViewType && this._mapView.easeTo({
												center: s,
												offset: this._options.navigatingOffset,
												easing: this._options.simulateEasing,
												duration: n
											}), this._simAnimator.on("update", function(r) {
												return v(l, void 0, void 0, function() {
													var e, i, o;
													return x(this, function(t) {
														return "simulateNavigate" === this._status && this._naviMng && this._dynamicMng && this._mapView &&
															(e = this._mapView.currentFloor, this.setMarker("sim", e, r), "first" === this._navigateViewType &&
																this._naviMng.setWalked(e, r, this._simIndex), Date.now() - a > this._options.simNaviInfoInterval &&
																(this._dynamicMng.findNearSegment(this._simIndex, new S(r.x, r.y), !1), i = this._dynamicMng
																	.getMessageInNavi(), o = this._dynamicMng.distanceToEnd(this._simIndex, r), this._fireNavigatingInfo(
																		m(m({}, i), {
																			distanceToEnd: o
																		})), i.isWillChange && !this._isPlayWill && (this._audioProvider.playMessage(i.message),
																		this._isPlayWill = !0), a = Date.now())), [2]
													})
												})
											}).on("complete", function() {
												return v(l, void 0, void 0, function() {
													var e, i, o, r, n = this;
													return x(this, function(t) {
														switch (t.label) {
															case 0:
																return delete this._simAnimator, this._isPlayWill = !1, "simulateNavigate" === this._status &&
																	this._mapView && this._dynamicMng && this._naviMng ? (this._simIndex += 1, u[this._simIndex] ?
																		u[this._simIndex].floor !== this._mapView.currentFloor ? [3, 1] : (this._dynamicMng.findNearSegment(
																				this._simIndex - 1, s, "first" === this._navigateViewType), e = this._dynamicMng.getMessageInNavi(),
																			i = this._dynamicMng.distanceToEnd(this._simIndex - 1, s), this._fireNavigatingInfo(m(m({},
																				e), {
																				distanceToEnd: i
																			})), [3, 4]) : [3, 5]) : [2];
															case 1:
																return [4, this._mapView.setCurrentFloor(u[this._simIndex].floor)];
															case 2:
																return t.sent(), [4, w(this._options.changeFloorTime)];
															case 3:
																t.sent(), "simulateNavigate" === this._status && (o = u[this._simIndex].line[0], "first" ===
																	this._navigateViewType && this._mapView.jumpTo({
																		center: o,
																		offset: this._options.navigatingOffset
																	}), this.setMarker("sim", u[this._simIndex].floor, o)), t.label = 4;
															case 4:
																return r = "first" === this._navigateViewType ? this._getRotateDuration(this._dynamicMng.crtRotate) :
																	0, this._isInTouchDuration || w(r).then(function() {
																		n._isInTouchDuration || p()
																	}), [3, 6];
															case 5:
																this.fire("simulateNavigateEnd"), this._audioProvider.playMessage(dr.get("arriveTip"), !0),
																	this._resetStatus(), this._toggleControl(!0), this._locationMng && this._locationMng.show(),
																	this.removeMarker("sim"), this._naviMng.setIsShowMultiline(!0), t.label = 6;
															case 6:
																return [2]
														}
													})
												})
											}).start(), [2]
								}
							})
						})
					};
				p()
			}
		}, Zr.prototype.getSegments = function() {
			return this._dynamicMng ? this._dynamicMng.getSegments() : []
		}, Zr.prototype._fireNavigatingInfo = function(t) {
			this.fire("navigatingInfo", t)
		}, Zr.prototype.setMarker = function(t, e, i) {
			this._markerMng.setMarker(t, e, i)
		}, Zr.prototype.hasNaviLine = function() {
			return this._naviMng && this._naviMng.hasNavi()
		}, Zr.prototype.getMarker = function(t) {
			return this._markerMng.getMarker(t)
		}, Zr.prototype.openAudio = function() {
			this._audioProvider.open()
		}, Zr.prototype.closeAudio = function() {
			this._audioProvider.close()
		}, Zr.prototype.playMessage = function(t) {
			this._audioProvider.playMessage(t)
		}, Zr.prototype.destroy = function() {
			this._mapView && (this._mapView.off("gestureStart", this._onMapGestureStart), this._mapView.off("gestureEnd", this
					._onMapGestureEnd), delete this._mapView), this._naviMng && (this._naviMng.destroy(), delete this._naviMng),
				this._markerMng.destroy(), this._audioProvider.destroy()
		}, Zr);

	function Zr(t) {
		var e = Ur.call(this) || this;
		return e._isInitNavi = !1, e._status = "init", e._isTipEnd = !1, e._isPlayWill = !1, e._isMapRotate = !1, e._audioProvider =
			new zr, e._isInTouchDuration = !1, e._simIndex = 0, e._navigateViewType = "first", e._deviateNum = 0, u([
				"_onMapGestureStart", "_onMapGestureEnd"
			], e), e._options = m(m({}, Gr), t), e._markerMng = new Cr(e._options.markerConfig), e
	}
	var jr, Yr = (e(Hr, jr = i), Hr.prototype._frameRender = function() {
		if (this._renderTimer = requestAnimationFrame(this._frameRender), this._mapView) {
			var t = this._mapView.getEngine();
			t && (t.getCamera().set({
				rotate: this._rotate
			}), this._mapView.fire("rotate"), this._mapView.fire("move"), t.render())
		}
	}, Hr.prototype.enableFlow = function() {
		this._isEnableFlow = !0, this._locationMarker && this._locationMarker.setRotate(0), this._renderTimer || this._frameRender()
	}, Hr.prototype.disableFlow = function() {
		this._isEnableFlow = !1, this._renderTimer && (cancelAnimationFrame(this._renderTimer), delete this._renderTimer)
	}, Hr.prototype._onRotate = function() {
		this._isEnableFlow || this.setRotate(this._rotate)
	}, Hr.prototype.addTo = function(t) {
		this._mapView = t, this._mapView.on("rotate", this._onRotate)
	}, Hr.prototype._createIconDom = function() {
		var e = this,
			t = this._isNavigating ? this._options.navigatingImage : this._options.iconImage,
			i = this._isNavigating ? this._options.navigatingSize : this._options.iconSize,
			o = new Image;
		return o.src = t, o.style.width = i[0] + "px", o.style.height = i[1] + "px", o.addEventListener("error", function() {
			setTimeout(function() {
				var t = e._createIconDom();
				e._locationMarker && e._locationMarker.updateDom(t)
			}, 1e3)
		}), o
	}, Hr.prototype.setPosition = function(e, t, i, o) {
		var r = this;
		if (void 0 === i && (i = 0), this._mapView && "0" !== e && 0 !== t.x && 0 !== t.y) {
			this._isAutoChangeFloor && this._mapView.setCurrentFloor(e);
			var n = !1;
			if (!this._locationMarker) {
				var s = this._createIconDom();
				this._locationMarker = new _o(s, {
					plane: !0
				}), this._mapView && this._locationMarker.addTo(this._mapView), n = !0
			}
			this._animator && this._animator.stop();
			var a = this._locationMarker.getPosition();
			a && a.floorId === e && 0 !== i ? (this._animator = (new L).ofObject(a.coordinate, t, i), this._animator.on(
					"update",
					function(t) {
						r._locationMarker && r._locationMarker.setPosition(e, t, o)
					}).on("complete", function() {
					delete r._animator
				}).start()) : this._locationMarker.setPosition(e, t, o), n && this.fire("locationSuccess"), this._isShow || this
				._locationMarker.hide()
		}
	}, Hr.prototype.getPosition = function() {
		return this._locationMarker && this._locationMarker.getPosition()
	}, Hr.prototype.removeLayer = function() {
		this._locationMarker && (this._locationMarker.remove(), delete this._locationMarker)
	}, Hr.prototype.show = function() {
		this._isShow || (this._isShow = !0, this._locationMarker && this._locationMarker.show())
	}, Hr.prototype.setAutoChangeFloor = function(t) {
		this._isAutoChangeFloor = t
	}, Hr.prototype.hide = function() {
		this._isShow && (this._isShow = !1, this._animator && this._animator.stop(), this._locationMarker && this._locationMarker
			.hide())
	}, Hr.prototype.setRotate = function(t) {
		if (this._rotate = t, !this._isEnableFlow && this._mapView && this._locationMarker) {
			var e = this._mapView.getRotate() || 0;
			this._locationMarker.setRotate(t - e)
		}
	}, Hr.prototype.getRotate = function() {
		return this._rotate
	}, Hr.prototype.startNavigate = function() {
		this._isNavigating = !0;
		var t = new Image;
		t.src = this._options.navigatingImage;
		var e = this._options.navigatingSize;
		t.style.width = e[0] + "px", t.style.height = e[1] + "px", this._locationMarker && this._locationMarker.updateDom(
			t)
	}, Hr.prototype.endNavigate = function() {
		this._isNavigating = !1;
		var t = new Image;
		t.src = this._options.iconImage;
		var e = this._options.iconSize;
		t.style.width = e[0] + "px", t.style.height = e[1] + "px", this._locationMarker && this._locationMarker.updateDom(
			t)
	}, Hr.prototype.hasPosition = function() {
		return Boolean(this._locationMarker)
	}, Hr);

	function Hr(t) {
		var e = jr.call(this) || this;
		return e._isNavigating = !1, e._rotate = 0, e._isShow = !0, e._isAutoChangeFloor = !0, e._isEnableFlow = !1, e._options =
			t, u(["_onRotate", "_frameRender"], e), e
	}

	function qr(t) {
		for (var e = 0, i = t.length - 1, o = 0; o < i; o += 1) e += (t[o][0] * t[o + 1][1] - t[o][1] * t[o + 1][0]) / 2;
		return e += (t[i][0] * t[0][1] - t[i][1] * t[0][0]) / 2, Math.abs(e)
	}
	var Xr = Object.freeze({
			__proto__: null,
			measure: qr,
			measurePolygon: function(t) {
				for (var e = qr(t[0]), i = 0, o = 1; o < t.length; o += 1) i += qr(t[o]);
				return e - i
			}
		}),
		Kr = {
			Map: Si,
			StyleUtils: Rt,
			ZoomControl: Bi,
			FloorControl: Di,
			CompassControl: Zi,
			ViewControl: qi,
			ScaleControl: Ji,
			LocateControl: io,
			FullscreenControl: so,
			Marker: _o,
			FillLayer: Ne,
			FillExtrusionLayer: Ue,
			SymbolLayer: He,
			LineLayer: xo,
			TrackLayer: Eo,
			ModelLayer: Vo,
			CircleLayer: Do,
			PictureLayer: Yo,
			HeatmapLayer: Jo,
			ConnectionLayer: rr,
			CanvasMarker: co,
			Animator: L,
			Navigate: Wr,
			LocationManager: Yr,
			TOOL: Or,
			UTILS: y,
			Point: S,
			language: dr,
			AREA: Xr,
			version: "5.5.0"
		};
	return t.AREA = Xr, t.Animator = L, t.CanvasMarker = co, t.CircleLayer = Do, t.CompassControl = Zi, t.ConnectionLayer =
		rr, t.FillExtrusionLayer = Ue, t.FillLayer = Ne, t.FloorControl = Di, t.FullscreenControl = so, t.HeatmapLayer = Jo,
		t.LineLayer = xo, t.LocateControl = io, t.LocationManager = Yr, t.Map = Si, t.Marker = _o, t.ModelLayer = Vo, t.Navigate =
		Wr, t.PictureLayer = Yo, t.Point = S, t.ScaleControl = Ji, t.StyleUtils = Rt, t.SymbolLayer = He, t.TOOL = Or, t.TrackLayer =
		Eo, t.UTILS = y, t.ViewControl = qi, t.ZoomControl = Bi, t.default = Kr, t.language = dr, t.version = "5.5.0", t
}({});
